[seam-commits] Seam SVN: r8372 - trunk/src/main/org/jboss/seam/persistence.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Jun 11 16:33:29 EDT 2008
Author: norman.richards at jboss.com
Date: 2008-06-11 16:33:29 -0400 (Wed, 11 Jun 2008)
New Revision: 8372
Modified:
trunk/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java
Log:
JBSEAM-3094
Modified: trunk/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java
===================================================================
--- trunk/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java 2008-06-11 20:27:39 UTC (rev 8371)
+++ trunk/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java 2008-06-11 20:33:29 UTC (rev 8372)
@@ -140,27 +140,12 @@
{
throw new IllegalStateException("cannot passivate persistence context with active transaction");
}
- //need to create a context, because this can get called
- //outside the JSF request, and we want to use the
- //PersistenceProvider object
- boolean createContext = !Contexts.isApplicationContextActive();
- if (createContext) Lifecycle.beginCall();
- try
- {
- if ( entityManager!=null && !PersistenceProvider.instance().isDirty(entityManager) )
- {
- entityManager.close();
- entityManager = null;
- }
- }
- finally
- {
- if (createContext) Lifecycle.endCall();
- }
}
//we can't use @PostActivate because it is intercept NEVER
- public void sessionDidActivate(HttpSessionEvent event) {}
+ public void sessionDidActivate(HttpSessionEvent event) {
+ entityManager = null;
+ }
@Destroy
public void destroy()
More information about the seam-commits
mailing list