Search in sources :

Example 1 with CloseWatcher

use of org.h2.util.CloseWatcher in project h2database by h2database.

the class JdbcConnection method closeOld.

private void closeOld() {
    while (true) {
        CloseWatcher w = CloseWatcher.pollUnclosed();
        if (w == null) {
            break;
        }
        try {
            w.getCloseable().close();
        } catch (Exception e) {
            trace.error(e, "closing session");
        }
        // there was an unclosed object -
        // keep the stack trace from now on
        keepOpenStackTrace = true;
        String s = w.getOpenStackTrace();
        Exception ex = DbException.get(ErrorCode.TRACE_CONNECTION_NOT_CLOSED);
        trace.error(ex, s);
    }
}
Also used : ValueString(org.h2.value.ValueString) DbException(org.h2.message.DbException) SQLClientInfoException(java.sql.SQLClientInfoException) SQLException(java.sql.SQLException) CloseWatcher(org.h2.util.CloseWatcher)

Aggregations

SQLClientInfoException (java.sql.SQLClientInfoException)1 SQLException (java.sql.SQLException)1 DbException (org.h2.message.DbException)1 CloseWatcher (org.h2.util.CloseWatcher)1 ValueString (org.h2.value.ValueString)1