print out the statement on closing for better debugging output

This commit is contained in:
Alex Huang 2011-11-16 16:23:29 -08:00
parent 110b37a937
commit 3d6a87867a

View File

@ -386,7 +386,7 @@ public class Transaction {
if (_stmt != null) {
try {
if (s_stmtLogger.isTraceEnabled()) {
s_stmtLogger.trace("Closing: " + _stmt);
s_stmtLogger.trace("Closing: " + _stmt.toString());
}
try {
ResultSet rs = _stmt.getResultSet();
@ -398,7 +398,7 @@ public class Transaction {
}
_stmt.close();
} catch (final SQLException e) {
s_stmtLogger.trace("Unable to close statement: " + _stmt);
s_stmtLogger.trace("Unable to close statement: " + _stmt.toString());
} finally {
_stmt = null;
}
@ -754,7 +754,7 @@ public class Transaction {
} else if (item.type == STATEMENT) {
try {
if (s_stmtLogger.isTraceEnabled()) {
s_stmtLogger.trace("Closing: " + ref);
s_stmtLogger.trace("Closing: " + ref.toString());
}
Statement stmt = (Statement)ref;
try {