/** Closes off this connection * @param connection to close */ protected void closeConnection(ConnectionHandle connection) { if (connection != null) { try { connection.internalClose(); } catch (Throwable t) { logger.error("Destroy connection exception", t); } finally { this.pool.postDestroyConnection(connection); } } } }
/** * Physically close off the internal connection. * @param conn */ protected void destroyConnection(ConnectionHandle conn) { postDestroyConnection(conn); conn.setInReplayMode(true); // we're dead, stop attempting to replay anything try { conn.internalClose(); } catch (SQLException e) { logger.error("Error in attempting to close connection", e); } }
/** * Physically close off the internal connection. * * @param conn the connection */ protected void destroyConnection(ConnectionHandle conn) { postDestroyConnection(conn); // we're dead, stop attempting to replay anything conn.setInReplayMode(true); try { conn.internalClose(); } catch (SQLException e) { LOGGER.error("Error in attempting to close connection", e); } }
/** Closes off this connection * @param connection to close */ protected void closeConnection(ConnectionHandle connection) { if (connection != null && !connection.isClosed()) { try { connection.internalClose(); } catch (SQLException e) { logger.error("Destroy connection exception", e); } finally { this.pool.postDestroyConnection(connection); connection.getOriginatingPartition().getPoolWatchThreadSignalQueue().offer(new Object()); // item being pushed is not important. } } }
postDestroyConnection(connectionHandle);
postDestroyConnection(connectionHandle);