public class SpringEntityManagerSessionFactory extends Object implements SessionFactory
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.Modifier and Type | Field and Description |
---|---|
protected boolean |
closeEntityManager |
protected javax.persistence.EntityManagerFactory |
entityManagerFactory |
protected boolean |
handleTransactions |
Constructor and Description |
---|
SpringEntityManagerSessionFactory(Object entityManagerFactory,
boolean handleTransactions,
boolean closeEntityManager) |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getSessionType() |
Session |
openSession() |
protected javax.persistence.EntityManagerFactory entityManagerFactory
protected boolean handleTransactions
protected boolean closeEntityManager
public SpringEntityManagerSessionFactory(Object entityManagerFactory, boolean handleTransactions, boolean closeEntityManager)
public Class<?> getSessionType()
getSessionType
in interface SessionFactory
public Session openSession()
openSession
in interface SessionFactory
Copyright © 2020. All rights reserved.