|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDataSourceUtil
public class DataSourceUtil
Utility methods to build a default connection pool
Method Summary | |
---|---|
static ManageableDataSource |
buildDefaultDataSource(String url,
String driverName,
String username,
String password,
int maxActive,
int minIdle,
String validationQuery,
boolean cachePreparedStatements,
int removeAbandonedTimeout)
Builds up a default DBCP DataSource that easy to use connection factories can use to setup a connection pool. |
static ManageableDataSource |
buildDefaultDataSource(String url,
String driverName,
String username,
String password,
String validationQuery)
Builds up a default DBCP DataSource that easy to use connection factories can use to setup a connection pool. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ManageableDataSource buildDefaultDataSource(String url, String driverName, String username, String password, String validationQuery) throws DataSourceException
url
- the jdbc urldriverName
- the jdbc driver full qualified class nameusername
- password
- validationQuery
- the validation query to be used for connection liveliness on
borrow, or null, if no check is to be performed
DataSourceException
public static ManageableDataSource buildDefaultDataSource(String url, String driverName, String username, String password, int maxActive, int minIdle, String validationQuery, boolean cachePreparedStatements, int removeAbandonedTimeout) throws DataSourceException
url
- the jdbc urldriverName
- the jdbc driver full qualified class nameusername
- password
- maxActive
- maximum number of concurrent connections in the poolminIdle
- minimum number of concurrent connections in the poolvalidationQuery
- the validation query to be used for connection liveliness on
borrow, or null, if no check is to be performedcachePreparedStatements
- wheter to cache prepared statements or not
DataSourceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |