Class SpringEntityManagerSessionFactory

  • All Implemented Interfaces:
    org.flowable.common.engine.impl.interceptor.SessionFactory

    public class SpringEntityManagerSessionFactory
    extends Object
    implements org.flowable.common.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.

    Author:
    Joram Barrez
    • Field Detail

      • entityManagerFactory

        protected javax.persistence.EntityManagerFactory entityManagerFactory
      • handleTransactions

        protected boolean handleTransactions
      • closeEntityManager

        protected boolean closeEntityManager
    • Constructor Detail

      • SpringEntityManagerSessionFactory

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

      • getSessionType

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

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