[ 
https://issues.apache.org/jira/browse/DBCP-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514044
 ] 

Dain Sundstrom commented on DBCP-97:
------------------------------------

Yes, this is correct.  When auto commit is off, you have an open transaction 
with the database, so leaving auto commit off while a connection is idle in the 
pool is a bad idea.

One note.  The current passivate code has the following block:

            conn.clearWarnings();
            if(!conn.getAutoCommit()) {
                conn.setAutoCommit(true);
            }

Do we want the clearWarnings() after the potential autocommit change?

> setAutoCommit(true) when returning connection to the pool
> ---------------------------------------------------------
>
>                 Key: DBCP-97
>                 URL: https://issues.apache.org/jira/browse/DBCP-97
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>         Environment: Operating System: All
> Platform: All
>            Reporter: Dirk Verbeeck
>             Fix For: 1.3
>
>
> From the Struts user list: [OT] RE: Stackoverflow after DB inactivity 
> (MySQL reconnect problem)
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg70196.html
> Giving a hint to the database driver that you don't need long running
> transactions makes sense. 
> setAutoCommit(true) should be added to 
> PoolableConnectionFactory.passivateObject

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to