Author: dan.j.allen
Date: 2008-09-21 21:45:18 -0400 (Sun, 21 Sep 2008)
New Revision: 9077
Modified:
branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/ManagedHibernateSession.java
branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java
Log:
don't attempt to change flush mode if persistence manager is already closed
Modified:
branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/ManagedHibernateSession.java
===================================================================
---
branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/ManagedHibernateSession.java 2008-09-21
23:55:14 UTC (rev 9076)
+++
branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/ManagedHibernateSession.java 2008-09-22
01:45:18 UTC (rev 9077)
@@ -247,7 +247,7 @@
public void changeFlushMode(FlushModeType flushMode)
{
- if (session!=null)
+ if (session!=null && session.isOpen())
{
setSessionFlushMode(flushMode);
}
Modified:
branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java
===================================================================
---
branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java 2008-09-21
23:55:14 UTC (rev 9076)
+++
branches/community/Seam_2_0/src/main/org/jboss/seam/persistence/ManagedPersistenceContext.java 2008-09-22
01:45:18 UTC (rev 9077)
@@ -282,7 +282,7 @@
public void changeFlushMode(FlushModeType flushMode)
{
- if (entityManager!=null)
+ if (entityManager!=null && entityManager.isOpen())
{
setEntityManagerFlushMode(flushMode);
}
Show replies by date