This is a Dbcp DataSource based implementation of IConnectionFactory.
It requires commons-collections.jar, commons-pool.jar, commons-dbcp.jar, j2ee.jar (for the javax.sql classes), the classes for your (underlying) JDBC driver in the classpath.
author: GautamJ
Creates a connection using Dbcp DataSource implementation.
throws: SQLException - if any SQL error occurs throws: IOException - if any IO error occurs a Connection
Returns the connection back to the pool.
Parameters: connection - The connection to return back to the pool. throws: SQLException - if any SQL error occurs throws: IOException - if any IO error occurs
Setter for property user.
Parameters: user - New value of property user.
setValidationQuery
public void setValidationQuery(String validationQuery)(Code)
Setter for property validationQuery.
Parameters: validationQuery - New value of property validationQuery.
usePreparedStatementCaching
public boolean usePreparedStatementCaching()(Code)
Returns a true if the Prepared (and Call) Statements are to be cached for a connection.
This will return a false. It uses the StackKeyedObjectPoolFactory for creating a pool for caching the PreparedStatements.
a true if the Prepared (and Call) Statements are to be cached for a connection.