commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27436] New: - With Oracle jdbc driver, an unnecessary SQL "set transaction read write" is issued each time a connection is retrieved from the pool
Date Thu, 04 Mar 2004 14:33:56 GMT
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=27436>.
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=27436

With Oracle jdbc driver, an unnecessary SQL "set transaction read write" is issued each time
a connection is retrieved from the pool

           Summary: With Oracle jdbc driver, an unnecessary SQL "set
                    transaction read write" is issued each time a connection
                    is retrieved from the pool
           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: glestum@netonomy.com


Using dbcp to pool Oracle jddbc driver connections, I noticed an SQL 
statement "set transaction read write" is issued each time I get a connection 
from the pool.

This is because of the following line in 
PoolableConnectionFactory.activateObject(Object obj):

 conn.setReadOnly(_defaultReadOnly);

In order to avoid unnecessary calls, it should better be:

 if (conn.isReadOnly()!=_defaultReadOnly) {
  conn.setReadOnly(_defaultReadOnly);
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message