|
49 | 49 | */ |
50 | 50 | public class JdbcCoordinatorImpl implements JdbcCoordinator { |
51 | 51 | private static final CoreMessageLogger LOG = CoreLogging.messageLogger( JdbcCoordinatorImpl.class ); |
| 52 | + private static final boolean TRACE_ENABLED = LOG.isTraceEnabled(); |
52 | 53 |
|
53 | 54 | private transient final LogicalConnectionImplementor logicalConnection; |
54 | 55 | private transient final JdbcSessionOwner owner; |
@@ -141,7 +142,7 @@ public void flushEnding() { |
141 | 142 |
|
142 | 143 | @Override |
143 | 144 | public Connection close() { |
144 | | - LOG.tracev( "Closing JDBC container [{0}]", this ); |
| 145 | + if ( TRACE_ENABLED ) LOG.tracev( "Closing JDBC container [{0}]", this ); |
145 | 146 | Connection connection; |
146 | 147 | try { |
147 | 148 | if ( currentBatch != null ) { |
@@ -264,7 +265,7 @@ public int determineRemainingTransactionTimeOutPeriod() { |
264 | 265 | @Override |
265 | 266 | public void afterStatementExecution() { |
266 | 267 | final ConnectionReleaseMode connectionReleaseMode = connectionReleaseMode(); |
267 | | - LOG.tracev( "Starting after statement execution processing [{0}]", connectionReleaseMode ); |
| 268 | + if ( TRACE_ENABLED ) LOG.tracev( "Starting after statement execution processing [{0}]", connectionReleaseMode ); |
268 | 269 | if ( connectionReleaseMode == AFTER_STATEMENT ) { |
269 | 270 | if ( ! releasesEnabled ) { |
270 | 271 | LOG.debug( "Skipping aggressive release due to manual disabling" ); |
@@ -320,7 +321,7 @@ public boolean isReadyForSerialization() { |
320 | 321 | @Override |
321 | 322 | @SuppressWarnings("unchecked") |
322 | 323 | public void registerLastQuery(Statement statement) { |
323 | | - LOG.tracev( "Registering last query statement [{0}]", statement ); |
| 324 | + if ( TRACE_ENABLED ) LOG.tracev( "Registering last query statement [{0}]", statement ); |
324 | 325 | if ( statement instanceof JdbcWrapper ) { |
325 | 326 | final JdbcWrapper<Statement> wrapper = (JdbcWrapper<Statement>) statement; |
326 | 327 | registerLastQuery( wrapper.getWrappedObject() ); |
|
0 commit comments