List of usage examples for org.apache.ibatis.datasource.pooled PooledDataSource setDriver
public void setDriver(String driver)
From source file:com.collective.messages.persistence.dao.BaseDataTestCase.java
License:Apache License
public static PooledDataSource createPooledDataSource(Properties props) { PooledDataSource ds = new PooledDataSource(); 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 va2 s .c o m }
From source file:com.websys.config.spring.ProductionDbConfig.java
License:Open Source License
public PooledDataSource createPooledDataSource() throws IOException { PooledDataSource ds = new PooledDataSource(); 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 ava 2 s. c om }
From source file:och.comp.db.base.BaseDb.java
License:Apache License
public static PooledDataSource createDataSource(Props p) { String url = p.findVal(db_url); PooledDataSource ds = new PooledDataSource(); ds.setDriver(p.findVal(db_driver)); ds.setUrl(url);/* w w w . ja va2 s. co m*/ ds.setUsername(p.findVal(db_user)); ds.setPassword(p.findVal(db_psw)); ds.setPoolMaximumActiveConnections(p.getIntVal(db_maxConnections)); ds.setPoolMaximumIdleConnections(p.getIntVal(db_idleConnections)); return ds; }
From source file:org.makersoft.shards.unit.BaseTest.java
License:Open Source License
public static PooledDataSource createPooledDataSource(String resource) throws IOException { Properties props = Resources.getResourceAsProperties(resource); PooledDataSource ds = new PooledDataSource(); ds.setDriver(props.getProperty("driver")); ds.setUrl(props.getProperty("url")); ds.setUsername(props.getProperty("username")); ds.setPassword(props.getProperty("password")); return ds;/*from ww w.j a va2 s. co m*/ }