/** * Close the accessor's connection. * This is used only for external connection pooling * when it is intended for the connection to be reconnected in the future. */ public void closeConnection() { // Unfortunately do not have the session to pass, fortunately it is not used. clearStatementCache(null); super.closeConnection(); }
/** * To be called after JTS transaction has been completed (committed or rolled back) */ public void afterJTSTransaction() { if (usesExternalTransactionController()) { setIsInTransaction(false); if ((getDatasourceConnection() != null) && usesExternalConnectionPooling()) { closeConnection(); setDatasourceConnection(null); } } }
/** * Used for load balancing and external pooling. */ public synchronized void decrementCallCount() { setCallCount(getCallCount() - 1); if (usesExternalConnectionPooling() && (!isInTransaction()) && (getCallCount() == 0)) { try { closeConnection(); } catch (DatabaseException ignore) { } // Don't allow for errors to be masked by disconnect. } }
setIsInTransaction(false); if ((getDatasourceConnection() != null) && usesExternalConnectionPooling()) { closeConnection(); setDatasourceConnection(null);
setIsInTransaction(false); if ((getDatasourceConnection() != null) && usesExternalConnectionPooling()) { closeConnection(); setDatasourceConnection(null);