[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1786) JTASessionContext.CleanupSynch does not remove sessions from currentSessionMap

Gary Sargent (JIRA) noreply at atlassian.com
Thu Sep 4 06:10:07 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31081#action_31081 ] 

Gary Sargent commented on HHH-1786:
-----------------------------------

I've tested this with WebSphere V6.1.0.19 and Hibernate 3.3.0 SP1 (CMT and Oracle).

Sessions are still not being removed from currentSessionMap. I've added debug into JTASessionContext.CleanupSynch.afterCompletion(), and the remove from map method always returns null.

I notice in WebSphereExtendedJTATransactionLookup that the patch in this JIRA entry to cache the localId reference in getLocalId() is not present in the official release. Should this not have made it into 3.3.0 GA?


> JTASessionContext.CleanupSynch does not remove sessions from currentSessionMap
> ------------------------------------------------------------------------------
>
>                 Key: HHH-1786
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1786
>             Project: Hibernate3
>          Issue Type: Improvement
>    Affects Versions: 3.1.2
>         Environment: IBM WebSphere 6.0.2.7, Hibernate CVS snapshot from 2006-02-24
>            Reporter: Tomi Szabo
>            Assignee: Steve Ebersole
>             Fix For: 3.3.0.CR2
>
>         Attachments: JTASessionContext.java, screenshot-1.jpg, screenshot-2.jpg, WebSphereExtendedJTATransactionLookup.java, WebSphereExtendedJTATransactionLookup.patch.txt
>
>
> We are using JTASessionContext, CMTTransaction and WebSphereExtendedJTATransactionLookup. We have experienced some memmory leak problems and after closer inspection we have found that Hibernate sessions are not removed from currentSessionMap inside JTASessionContext.
> Method JTASessionContext.CleanupSynch.afterCompletion() is called as expected but code "context.currentSessionMap.remove( txn );" does not remove session from Map because of key's hashcode has changed. This is due to fact that com.ibm.websphere.jtaextensions.ExtendedJTATransaction.hashCode is actually ID of underlaying transaction. But if it comes to the afterCompletion method in CleanupSynch the underlaying transaction is already closed. Closed transaction has ID 0 (default value) and it is different from ID under which the Hibernate session was previously inserted into Map.
> Possible patch is in attachements.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list