@@ -127,7 +127,7 @@ public abstract class SharedEntityManagerCreator {
|
||||
|
||||
/**
|
||||
* Create a transactional EntityManager proxy for the given EntityManagerFactory.
|
||||
* @param emf EntityManagerFactory to obtain EntityManagers from as needed
|
||||
* @param emf the EntityManagerFactory to obtain EntityManagers from as needed
|
||||
* @param properties the properties to be passed into the
|
||||
* {@code createEntityManager} call (may be {@code null})
|
||||
* @param entityManagerInterfaces the interfaces to be implemented by the
|
||||
@@ -142,7 +142,7 @@ public abstract class SharedEntityManagerCreator {
|
||||
|
||||
/**
|
||||
* Create a transactional EntityManager proxy for the given EntityManagerFactory.
|
||||
* @param emf EntityManagerFactory to obtain EntityManagers from as needed
|
||||
* @param emf the EntityManagerFactory to obtain EntityManagers from as needed
|
||||
* @param properties the properties to be passed into the
|
||||
* {@code createEntityManager} call (may be {@code null})
|
||||
* @param synchronizedWithTransaction whether to automatically join ongoing
|
||||
@@ -345,11 +345,11 @@ public abstract class SharedEntityManagerCreator {
|
||||
private final Query target;
|
||||
|
||||
@Nullable
|
||||
private EntityManager em;
|
||||
private EntityManager entityManager;
|
||||
|
||||
public DeferredQueryInvocationHandler(Query target, EntityManager em) {
|
||||
public DeferredQueryInvocationHandler(Query target, EntityManager entityManager) {
|
||||
this.target = target;
|
||||
this.em = em;
|
||||
this.entityManager = entityManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -387,8 +387,8 @@ public abstract class SharedEntityManagerCreator {
|
||||
if (queryTerminatingMethods.contains(method.getName())) {
|
||||
// Actual execution of the query: close the EntityManager right
|
||||
// afterwards, since that was the only reason we kept it open.
|
||||
EntityManagerFactoryUtils.closeEntityManager(this.em);
|
||||
this.em = null;
|
||||
EntityManagerFactoryUtils.closeEntityManager(this.entityManager);
|
||||
this.entityManager = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user