| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.persistence.engines.jdbcengine.datasource.DbcpDataSourceConnectionFactory
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.
| Constructor Summary | |
| DbcpDataSourceConnectionFactory() | |
| Method Summary | |
|  Connection | createConnection()Creates a connection using Dbcp DataSource implementation. | 
|  void | freeConnection(Connection connection)Returns the connection back to the pool. | 
|  String | getDriverClass()Getter for property driverClass. | 
|  Integer | getMaximumConnections()Getter for property maximumConnections. | 
|  Long | getMaxWait()Getter for property maxWait. | 
|  Integer | getMinimumConnections()Getter for property minimumConnections. | 
|  String | getPassword()Getter for property password. | 
|  Boolean | getTestOnBorrow()Getter for property testOnBorrow. | 
|  Boolean | getTestOnReturn()Getter for property testOnReturn. | 
|  String | getUrl()Getter for property url. | 
|  String | getUser()Getter for property user. | 
|  String | getValidationQuery()Getter for property validationQuery. | 
|  void | setDriverClass(String driverClass)Setter for property driverClass. | 
|  void | setMaximumConnections(Integer maximumConnections)Setter for property maximumConnections. | 
|  void | setMaxWait(Long maxWait)Setter for property maxWait. | 
|  void | setMinimumConnections(Integer minimumConnections)Setter for property minimumConnections. | 
|  void | setPassword(String password)Setter for property password. | 
|  void | setTestOnBorrow(Boolean testOnBorrow)Setter for property testOnBorrow. | 
|  void | setTestOnReturn(Boolean testOnReturn)Setter for property testOnReturn. | 
|  void | setUrl(String url)Setter for property url. | 
|  void | setUser(String user)Setter for property user. | 
|  void | setValidationQuery(String validationQuery)Setter for property validationQuery. | 
|  boolean | usePreparedStatementCaching()Returns a true if the Prepared (and Call) Statements are to be cached for a connection. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public DbcpDataSourceConnectionFactory()
| Method Detail | 
public String getDriverClass()
public void setDriverClass(String driverClass)
driverClass - New value of property driverClass.public String getUrl()
public void setUrl(String url)
url - New value of property url.public String getUser()
public void setUser(String user)
user - New value of property user.public String getPassword()
public void setPassword(String password)
password - New value of property password.public Integer getMinimumConnections()
public void setMinimumConnections(Integer minimumConnections)
minimumConnections - New value of property minimumConnections.public Integer getMaximumConnections()
public void setMaximumConnections(Integer maximumConnections)
maximumConnections - New value of property maximumConnections.public Long getMaxWait()
public void setMaxWait(Long maxWait)
maxWait - New value of property maxWait.public Boolean getTestOnBorrow()
public void setTestOnBorrow(Boolean testOnBorrow)
testOnBorrow - New value of property testOnBorrow.public Boolean getTestOnReturn()
public void setTestOnReturn(Boolean testOnReturn)
testOnReturn - New value of property testOnReturn.public String getValidationQuery()
public void setValidationQuery(String validationQuery)
validationQuery - New value of property validationQuery.
public Connection createConnection()
                            throws SQLException,
                                   IOException
createConnection in interface IConnectionFactorySQLException - if any SQL error occurs
IOException - if any IO error occurs
public void freeConnection(Connection connection)
                    throws SQLException,
                           IOException
freeConnection in interface IConnectionFactoryconnection - The connection to return back to the pool.
SQLException - if any SQL error occurs
IOException - if any IO error occurspublic boolean usePreparedStatementCaching()
usePreparedStatementCaching in interface IConnectionFactory| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||