提交 7854b7ac 编写于 作者: J Juergen Hoeller

Avoid log statements between resource opening and returning

Issue: SPR-17559
上级 26b1c848
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -115,7 +115,6 @@ public abstract class DataSourceUtils {
Connection con = fetchConnection(dataSource);
if (TransactionSynchronizationManager.isSynchronizationActive()) {
logger.debug("Registering transaction synchronization for JDBC Connection");
// Use same Connection for further JDBC actions within the transaction.
// Thread-bound object will get removed by synchronization at transaction completion.
ConnectionHolder holderToUse = conHolder;
......@@ -337,7 +336,6 @@ public abstract class DataSourceUtils {
return;
}
}
logger.debug("Returning JDBC Connection to DataSource");
doCloseConnection(con, dataSource);
}
......
......@@ -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();
......
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -128,7 +128,6 @@ public abstract class ConnectionFactoryUtils {
Connection con = cf.getConnection();
if (TransactionSynchronizationManager.isSynchronizationActive()) {
logger.debug("Registering transaction synchronization for CCI Connection");
conHolder = new ConnectionHolder(con);
conHolder.setSynchronizedWithTransaction(true);
TransactionSynchronizationManager.registerSynchronization(new ConnectionSynchronization(conHolder, cf));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册