|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.rhi.architecture.db.InitializingConnectionFactory
Wrapper/Decorator Factory which allows you to run an arbitrary SQL statement after each connection is created. This can be useful for calling "use schema ?" or or any number of other connection intialization statements before passing the connection back to the client.
Constructor Summary | |
InitializingConnectionFactory(org.apache.commons.dbcp.ConnectionFactory factory,
java.lang.String sql)
Constructor - the Connection factory you wish to supplement. |
Method Summary | |
java.sql.Connection |
createConnection()
Create the connection using the provided connection factory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InitializingConnectionFactory(org.apache.commons.dbcp.ConnectionFactory factory, java.lang.String sql)
factory
- sql
- Method Detail |
public java.sql.Connection createConnection() throws java.sql.SQLException
createConnection
in interface org.apache.commons.dbcp.ConnectionFactory
java.sql.SQLException
ConnectionFactory.createConnection()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |