Example usage for org.apache.ibatis.datasource.unpooled UnpooledDataSource setPassword

List of usage examples for org.apache.ibatis.datasource.unpooled UnpooledDataSource setPassword

Introduction

In this page you can find the example usage for org.apache.ibatis.datasource.unpooled UnpooledDataSource setPassword.

Prototype

public void setPassword(String password) 

Source Link

Usage

From source file:com.collective.messages.persistence.dao.BaseDataTestCase.java

License:Apache License

private static UnpooledDataSource createUnpooledDataSource(Properties props) {
    UnpooledDataSource ds = new UnpooledDataSource();
    ds.setDriver(props.getProperty(DRIVER));
    ds.setUrl(props.getProperty(URL));
    ds.setUsername(props.getProperty(USERNAME));
    ds.setPassword(props.getProperty(PASSWORD));
    return ds;/*  w  ww  .  ja va  2  s .  c  o m*/
}

From source file:com.websys.config.spring.ProductionDbConfig.java

License:Open Source License

public UnpooledDataSource createUnpooledDataSource() throws IOException {
    UnpooledDataSource ds = new UnpooledDataSource();
    ds.setDriver(environment.getRequiredProperty("prod.datasource.driver"));
    ds.setUrl(environment.getRequiredProperty("prod.datasource.url"));
    ds.setUsername(environment.getRequiredProperty("prod.datasource.username"));
    ds.setPassword(environment.getRequiredProperty("prod.datasource.password"));
    return ds;//from w w w  .j av  a2  s.c  o m
}

From source file:org.makersoft.shards.unit.BaseTest.java

License:Open Source License

public static UnpooledDataSource createUnpooledDataSource(String resource) throws IOException {
    Properties props = Resources.getResourceAsProperties(resource);
    UnpooledDataSource ds = new UnpooledDataSource();
    ds.setDriver(props.getProperty("driver"));
    ds.setUrl(props.getProperty("url"));
    ds.setUsername(props.getProperty("username"));
    ds.setPassword(props.getProperty("password"));
    return ds;//from w  w  w  .j a  va 2s  .  c o  m
}

From source file:org.makersoft.shards.unit.BaseTest.java

License:Open Source License

public static DataSource createDataSource_1() throws IOException, SQLException {

    Properties props = Resources.getResourceAsProperties(H2_PROPERTIES);
    UnpooledDataSource ds = new UnpooledDataSource();
    ds.setDriver(props.getProperty("jdbc.driver"));
    ds.setUrl(props.getProperty("ds1.jdbc.url"));
    ds.setUsername(props.getProperty("ds1.jdbc.username"));
    ds.setPassword(props.getProperty("ds1.jdbc.password"));

    return ds;/*  w  ww  . j a  v a 2 s . c o m*/
}

From source file:org.makersoft.shards.unit.BaseTest.java

License:Open Source License

public static DataSource createDataSource_2() throws IOException, SQLException {

    Properties props = Resources.getResourceAsProperties(H2_PROPERTIES);
    UnpooledDataSource ds = new UnpooledDataSource();
    ds.setDriver(props.getProperty("jdbc.driver"));
    ds.setUrl(props.getProperty("ds2.jdbc.url"));
    ds.setUsername(props.getProperty("ds2.jdbc.username"));
    ds.setPassword(props.getProperty("ds2.jdbc.password"));

    return ds;//from  w ww . j a  v a 2 s .  c o  m
}

From source file:org.makersoft.shards.unit.BaseTest.java

License:Open Source License

public static DataSource createDataSource_3() throws IOException, SQLException {

    Properties props = Resources.getResourceAsProperties(H2_PROPERTIES);
    UnpooledDataSource ds = new UnpooledDataSource();
    ds.setDriver(props.getProperty("jdbc.driver"));
    ds.setUrl(props.getProperty("ds3.jdbc.url"));
    ds.setUsername(props.getProperty("ds3.jdbc.username"));
    ds.setPassword(props.getProperty("ds3.jdbc.password"));

    return ds;//from w w  w . j a v a 2  s .  co  m
}