[jbossseam-issues] [JBoss JIRA] Assigned: (JBSEAM-3728) not clearing EntityManager in ManagedPersistenceContext#sessionWillPassivate breaks session replication

Dan Allen (JIRA) jira-events at lists.jboss.org
Tue Dec 2 09:14:37 EST 2008


     [ https://jira.jboss.org/jira/browse/JBSEAM-3728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Allen reassigned JBSEAM-3728:
---------------------------------

    Assignee: Dan Allen


> not clearing EntityManager in ManagedPersistenceContext#sessionWillPassivate breaks session replication
> -------------------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-3728
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3728
>             Project: Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.0.SP1
>            Reporter: Dan Allen
>            Assignee: Dan Allen
>             Fix For: 2.1.1.CR2
>
>   Original Estimate: 4 hours
>  Remaining Estimate: 4 hours
>
> Commit 8372 broke the clustering because EntityManager is not being cleared before session passivation. The EntityManager cannot be serialized and therefore to leave it in the conversation context (and hence the session context) prevents the HTTP session from being restored properly. Two ways to fix is either set the EntityManager it to null in the ManagedPersistenceContext#sessionWillPassivate method (the old behavior, which gives us a chance to clean things up) or mark the field as transient. Making the field transient solves the problem that commit 8372 was attempting to fix, which was that the entities were being reloaded from the database on each request in a clustered environment. The problem with using transient is that we don't get an opportunity to formally close the EntityManager (but then again, it might be hard to tell when the session being used jumps a node in the cluster, which is the only time you want to destroy the EntityManager).

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

        



More information about the seam-issues mailing list