类 SharedEntityManagerCreator

    • 方法详细资料

      • createSharedEntityManager

        public static EntityManager createSharedEntityManager​(EntityManagerFactory emf)
        Create a transactional EntityManager proxy for the given EntityManagerFactory.
        参数:
        emf - the EntityManagerFactory to delegate to.
        返回:
        a shareable transaction EntityManager proxy
      • createSharedEntityManager

        public static EntityManager createSharedEntityManager​(EntityManagerFactory emf,
                                                              Map<?,​?> properties)
        Create a transactional EntityManager proxy for the given EntityManagerFactory.
        参数:
        emf - the EntityManagerFactory to delegate to.
        properties - the properties to be passed into the createEntityManager call (may be null)
        返回:
        a shareable transaction EntityManager proxy
      • createSharedEntityManager

        public static EntityManager createSharedEntityManager​(EntityManagerFactory emf,
                                                              Map<?,​?> properties,
                                                              boolean synchronizedWithTransaction)
        Create a transactional EntityManager proxy for the given EntityManagerFactory.
        参数:
        emf - the EntityManagerFactory to delegate to.
        properties - the properties to be passed into the createEntityManager call (may be null)
        synchronizedWithTransaction - whether to automatically join ongoing transactions (according to the JPA 2.1 SynchronizationType rules)
        返回:
        a shareable transaction EntityManager proxy
        从以下版本开始:
        4.0
      • createSharedEntityManager

        public static EntityManager createSharedEntityManager​(EntityManagerFactory emf,
                                                              Map<?,​?> properties,
                                                              Class<?>... entityManagerInterfaces)
        Create a transactional EntityManager proxy for the given EntityManagerFactory.
        参数:
        emf - the EntityManagerFactory to obtain EntityManagers from as needed
        properties - the properties to be passed into the createEntityManager call (may be null)
        entityManagerInterfaces - the interfaces to be implemented by the EntityManager. Allows the addition or specification of proprietary interfaces.
        返回:
        a shareable transactional EntityManager proxy
      • createSharedEntityManager

        public static EntityManager createSharedEntityManager​(EntityManagerFactory emf,
                                                              Map<?,​?> properties,
                                                              boolean synchronizedWithTransaction,
                                                              Class<?>... entityManagerInterfaces)
        Create a transactional EntityManager proxy for the given EntityManagerFactory.
        参数:
        emf - the EntityManagerFactory to obtain EntityManagers from as needed
        properties - the properties to be passed into the createEntityManager call (may be null)
        synchronizedWithTransaction - whether to automatically join ongoing transactions (according to the JPA 2.1 SynchronizationType rules)
        entityManagerInterfaces - the interfaces to be implemented by the EntityManager. Allows the addition or specification of proprietary interfaces.
        返回:
        a shareable transactional EntityManager proxy
        从以下版本开始:
        4.0