Avoid log statements between resource opening and returning

Issue: SPR-17559
This commit is contained in:
Juergen Hoeller
2018-12-03 23:50:50 +01:00
parent 26b1c848b8
commit 7854b7ac40
3 changed files with 2 additions and 7 deletions

View File

@@ -268,7 +268,6 @@ public abstract class EntityManagerFactoryUtils {
// Use same EntityManager for further JPA operations within the transaction.
// Thread-bound object will get removed by synchronization at transaction completion.
logger.debug("Registering transaction synchronization for JPA EntityManager");
emHolder = new EntityManagerHolder(em);
if (synchronizedWithTransaction) {
Object transactionData = prepareTransaction(em, emf);
@@ -415,7 +414,6 @@ public abstract class EntityManagerFactoryUtils {
*/
public static void closeEntityManager(@Nullable EntityManager em) {
if (em != null) {
logger.debug("Closing JPA EntityManager");
try {
if (em.isOpen()) {
em.close();