[seam-commits] Seam SVN: r9078 - trunk/src/main/org/jboss/seam/persistence.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sun Sep 21 21:46:37 EDT 2008


Author: dan.j.allen
Date: 2008-09-21 21:46:37 -0400 (Sun, 21 Sep 2008)
New Revision: 9078

Modified:
   trunk/src/main/org/jboss/seam/persistence/ManagedHibernateSession.java
   trunk/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java
Log:
JBSEAM-3440


Modified: trunk/src/main/org/jboss/seam/persistence/ManagedHibernateSession.java
===================================================================
--- trunk/src/main/org/jboss/seam/persistence/ManagedHibernateSession.java	2008-09-22 01:45:18 UTC (rev 9077)
+++ trunk/src/main/org/jboss/seam/persistence/ManagedHibernateSession.java	2008-09-22 01:46:37 UTC (rev 9078)
@@ -253,7 +253,7 @@
    
    public void changeFlushMode(FlushModeType flushMode)
    {
-      if (session!=null)
+      if (session!=null && session.isOpen())
       {
          setSessionFlushMode(flushMode);
       }

Modified: trunk/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java
===================================================================
--- trunk/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java	2008-09-22 01:45:18 UTC (rev 9077)
+++ trunk/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java	2008-09-22 01:46:37 UTC (rev 9078)
@@ -283,7 +283,7 @@
    
    public void changeFlushMode(FlushModeType flushMode)
    {
-      if (entityManager!=null)
+      if (entityManager!=null && entityManager.isOpen())
       {
          setEntityManagerFlushMode(flushMode);
       }




More information about the seam-commits mailing list