Class SpringEntityManagerSessionFactory

  • All Implemented Interfaces:
    org.activiti.engine.impl.interceptor.SessionFactory

    public class SpringEntityManagerSessionFactory
    extends java.lang.Object
    implements org.activiti.engine.impl.interceptor.SessionFactory
    Session Factory for EntityManagerSession.

    Must be used when the EntityManagerFactory is managed by Spring. This implementation will retrieve the EntityManager bound to the thread by Spring in case a transaction already started.

    • Constructor Summary

      Constructors 
      Constructor Description
      SpringEntityManagerSessionFactory​(java.lang.Object entityManagerFactory, boolean handleTransactions, boolean closeEntityManager)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<?> getSessionType()  
      org.activiti.engine.impl.interceptor.Session openSession​(org.activiti.engine.impl.interceptor.CommandContext commandContext)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • entityManagerFactory

        protected javax.persistence.EntityManagerFactory entityManagerFactory
      • handleTransactions

        protected boolean handleTransactions
      • closeEntityManager

        protected boolean closeEntityManager
    • Constructor Detail

      • SpringEntityManagerSessionFactory

        public SpringEntityManagerSessionFactory​(java.lang.Object entityManagerFactory,
                                                 boolean handleTransactions,
                                                 boolean closeEntityManager)
    • Method Detail

      • getSessionType

        public java.lang.Class<?> getSessionType()
        Specified by:
        getSessionType in interface org.activiti.engine.impl.interceptor.SessionFactory
      • openSession

        public org.activiti.engine.impl.interceptor.Session openSession​(org.activiti.engine.impl.interceptor.CommandContext commandContext)
        Specified by:
        openSession in interface org.activiti.engine.impl.interceptor.SessionFactory