You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/12/22 14:32:26 UTC
DO NOT REPLY [Bug 25696] New: -
initializationStatement and destructionStatement in PoolableConnectionFactory
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25696>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25696
initializationStatement and destructionStatement in PoolableConnectionFactory
Summary: initializationStatement and destructionStatement in
PoolableConnectionFactory
Product: Commons
Version: 1.1 Final
Platform: All
OS/Version: All
Status: NEW
Severity: Enhancement
Priority: Other
Component: Dbcp
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: dirk.verbeeck@pandora.be
proposal & patch from Brent Verner (slightly edited)
-----------------------------------------------------
I've often had the need to perform some setup of a connection
before it can be used, such as:
ALTER SESSION SET current_schema = workable_schema;
As such, I've had a hacked version of dbcp around for a while
that adds an initializationStatement and destructionStatement.
Both are fed thru the Statement.execute(String) method, and
nothing is done with any (possible) ResultSet from the query.
These statements are executed in the makeObject() and destroyObject() methods of
PoolableConnectionFactory.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org