commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dain Sundstrom (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DBCP-97) setAutoCommit(true) when returning connection to the pool
Date Thu, 19 Jul 2007 23:28:06 GMT

    [ 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/mysql@lists.mysql.com/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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message