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

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

Introduction

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

Prototype

public void setUrl(String url) 

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;//from w  ww. ja va  2s  .  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;//ww  w. jav a 2  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;// w w w  .j  av a2s .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;//from ww w.  ja v  a 2 s.co  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;//www .  j av  a 2  s.  co 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;// ww w  .ja v a  2s  .c  om
}