HHH-8210 JdbcCoordinatorImpl logs excessive warnings with some

connection pools
This commit is contained in:
Brett Meyer 2013-06-27 22:48:48 -04:00
parent 97304a291d
commit 4ee9ade353
2 changed files with 9 additions and 3 deletions

View File

@ -420,7 +420,9 @@ public class JdbcCoordinatorImpl implements JdbcCoordinator {
}
}
if ( statement != null ) {
if ( LOG.isEnabled( Level.WARN ) && !xref.containsKey( statement ) ) {
// Keep this at DEBUG level, rather than warn. Numerous connection pool implementations can return a
// proxy/wrapper around the JDBC Statement, causing excessive logging here. See HHH-8210.
if ( LOG.isEnabled( Level.DEBUG ) && !xref.containsKey( statement ) ) {
LOG.unregisteredStatement();
}
Set<ResultSet> resultSets = xref.get( statement );
@ -447,7 +449,9 @@ public class JdbcCoordinatorImpl implements JdbcCoordinator {
}
}
if ( statement != null ) {
if ( LOG.isEnabled( Level.WARN ) && !xref.containsKey( statement ) ) {
// Keep this at DEBUG level, rather than warn. Numerous connection pool implementations can return a
// proxy/wrapper around the JDBC Statement, causing excessive logging here. See HHH-8210.
if ( LOG.isEnabled( Level.DEBUG ) && !xref.containsKey( statement ) ) {
LOG.unregisteredStatement();
}
final Set<ResultSet> resultSets = xref.get( statement );

View File

@ -1342,7 +1342,9 @@ public interface CoreMessageLogger extends BasicLogger {
@Message(value = "ResultSet had no statement associated with it, but was not yet registered", id = 386)
void unregisteredResultSetWithoutStatement();
@LogMessage(level = WARN)
// Keep this at DEBUG level, rather than warn. Numerous connection pool implementations can return a
// proxy/wrapper around the JDBC Statement, causing excessive logging here. See HHH-8210.
@LogMessage(level = DEBUG)
@Message(value = "ResultSet's statement was not registered", id = 387)
void unregisteredStatement();