List of usage examples for org.apache.ibatis.datasource.pooled PooledDataSource setUrl
public void setUrl(String url)
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;/* w ww.j ava2 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 a v a2 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));/* ww w .jav a2 s . c o m*/ ds.setUrl(url); 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;// ww w. j a v a 2 s . co m }