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);
}
Show replies by date