4 Replies Latest reply on Jun 2, 2011 10:49 AM by Shawn Zimmerman

    Hibernate Configuration

    Shawn Zimmerman Newbie

      Any ideas on what could be causing this warning?

      WARN  org.jboss.seam.Component  - Exception calling component @Destroy method: serviceTableBean
      javax.el.ELException: java.lang.IllegalStateException: EntityManager is closed


      <persistence:entity-manager-factory name="entityManagerFactory" persistence-unit-name="myDatabasePU" />
      <persistence:managed-persistence-context name="entityManager" auto-create="true" entity-manager-factory="#{entityManagerFactory}" />
      <factory name="session" scope="STATELESS" auto-create="true" value="#{entityManager.delegate}" />


      public class ServiceTableBean implements Serializable {
          private Session session;

      I do not explicitly call session.close().  Is it because I am using a STATELESS entityManager delegate?  Should I be using a Seam-managed Hibernation session instead since I am using Hibernate as my JPA?

      How can I troubleshoot this?