commons-dev mailing list archives

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


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:

            if(!conn.getAutoCommit()) {

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

> setAutoCommit(true) when returning connection to the pool
> ---------------------------------------------------------
>                 Key: DBCP-97
>                 URL:
>             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)
> 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:
For additional commands, e-mail:

View raw message