You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Dain Sundstrom (JIRA)" <ji...@apache.org> on 2007/07/20 01:28:06 UTC
[jira] Commented: (DBCP-97) setAutoCommit(true) when returning
connection to the pool
[ 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