[jboss-jira] [JBoss JIRA] Updated: (JBMESSAGING-1227) Statement leak in HandleBeforeCommit1PCRunner
Tim Fox (JIRA)
jira-events at lists.jboss.org
Tue Feb 5 06:00:16 EST 2008
[ http://jira.jboss.com/jira/browse/JBMESSAGING-1227?page=all ]
Tim Fox updated JBMESSAGING-1227:
---------------------------------
Priority: Minor (was: Blocker)
There is a simple workaround for this, see linked duplicate task
> Statement leak in HandleBeforeCommit1PCRunner
> ---------------------------------------------
>
> Key: JBMESSAGING-1227
> URL: http://jira.jboss.com/jira/browse/JBMESSAGING-1227
> Project: JBoss Messaging
> Issue Type: Bug
> Affects Versions: 1.4.0.SP3
> Reporter: Kevin Conner
> Assigned To: Tim Fox
> Priority: Minor
>
> From JBESB-1450
> "This leak appears to be coming from JBoss Messaging, specifically JDBCPersistenceManager$1HandleBeforeCommit1PCRunner.doTransaction(JDBCPersistenceManager.java:1587)
> This line creates a prepared statement within a loop but only the last statement created will be released. Other examples of this construct, within this file, use a simple guard to prevent subsequent allocations. This appears to be the only occurrence which does not."
> "The following change fixes the leak.
> Index: src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java
> ===================================================================
> --- src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java (revision 3648)
> +++ src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java (working copy)
> @@ -1584,8 +1584,11 @@
> ChannelRefPair pair = (ChannelRefPair) i.next();
> MessageReference ref = pair.ref;
>
> - psReference = conn
> + if (psReference == null)
> + {
> + psReference = conn
> .prepareStatement(getSQLStatement("INSERT_MESSAGE_REF"));
> + }
>
> // Now store the reference
> addReference(pair.channelID, ref, psReference, false);
> "
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list