/** * 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. */ @Override public void closeConnection() { // Unfortunately do not have the session to pass, fortunately it is not used. clearStatementCache(null); super.closeConnection(); }
/** * 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(); }
/** * 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. */ @Override public void closeConnection() { // Unfortunately do not have the session to pass, fortunately it is not used. clearStatementCache(null); super.closeConnection(); }
/** * Called from beforeCompletion external transaction synchronization listener callback * to close the external connection corresponding to the completing external transaction. * Final sql calls could be sent through the connection by this method * before it closes the connection. */ public void closeJTSConnection() { if (usesExternalTransactionController()) { this.isInTransaction = false; if (this.usesExternalConnectionPooling) { closeConnection(); } } }
/** * Called from beforeCompletion external transaction synchronization listener callback * to close the external connection corresponding to the completing external transaction. * Final sql calls could be sent through the connection by this method * before it closes the connection. */ public void closeJTSConnection() { if (usesExternalTransactionController()) { this.isInTransaction = false; if (this.usesExternalConnectionPooling) { closeConnection(); } } }
/** * Called from beforeCompletion external transaction synchronization listener callback * to close the external connection corresponding to the completing external transaction. * Final sql calls could be sent through the connection by this method * before it closes the connection. */ public void closeJTSConnection() { if (usesExternalTransactionController()) { this.isInTransaction = false; if (this.usesExternalConnectionPooling) { closeConnection(); } } }
/** * Used for load balancing and external pooling. */ public synchronized void decrementCallCount() { int count = this.callCount; // Avoid decrementing count if already zero, (failure before increment). if (count <= 0) { return; } this.callCount--; if (this.usesExternalConnectionPooling && (!this.isInTransaction) && (currentSession == null || !currentSession.isExclusiveConnectionRequired()) && (count == 1)) { try { closeConnection(); } catch (DatabaseException ignore) { // Don't allow for errors to be masked by disconnect. } } }
/** * Used for load balancing and external pooling. */ public synchronized void decrementCallCount() { int count = this.callCount; // Avoid decrementing count if already zero, (failure before increment). if (count <= 0) { return; } this.callCount--; if (this.usesExternalConnectionPooling && (!this.isInTransaction) && (currentSession == null || !currentSession.isExclusiveConnectionRequired()) && (count == 1)) { try { closeConnection(); } catch (DatabaseException ignore) { // Don't allow for errors to be masked by disconnect. } } }
/** * Used for load balancing and external pooling. */ public synchronized void decrementCallCount() { int count = this.callCount; // Avoid decrementing count if already zero, (failure before increment). if (count <= 0) { return; } this.callCount--; if (this.usesExternalConnectionPooling && (!this.isInTransaction) && (currentSession == null || !currentSession.isExclusiveConnectionRequired()) && (count == 1)) { try { closeConnection(); } catch (DatabaseException ignore) { // Don't allow for errors to be masked by disconnect. } } }
/** * Begin a transaction on the database. If not using managed transaction begin a local transaction. */ public void beginTransaction(AbstractSession session) throws DatabaseException { if (usesExternalTransactionController()) { if (session.isExclusiveConnectionRequired() && !this.isInTransaction && this.usesExternalConnectionPooling) { closeConnection(); } this.isInTransaction = true; return; } session.log(SessionLog.FINER, SessionLog.TRANSACTION, "begin_transaction", (Object[])null, this); try { session.startOperationProfile(SessionProfiler.TRANSACTION); incrementCallCount(session); basicBeginTransaction(session); this.isInTransaction = true; } finally { decrementCallCount(); session.endOperationProfile(SessionProfiler.TRANSACTION); } }
/** * Begin a transaction on the database. If not using managed transaction begin a local transaction. */ public void beginTransaction(AbstractSession session) throws DatabaseException { if (usesExternalTransactionController()) { if (session.isExclusiveConnectionRequired() && !this.isInTransaction && this.usesExternalConnectionPooling) { closeConnection(); } this.isInTransaction = true; return; } session.log(SessionLog.FINER, SessionLog.TRANSACTION, "begin_transaction", (Object[])null, this); try { session.startOperationProfile(SessionProfiler.Transaction); incrementCallCount(session); basicBeginTransaction(session); this.isInTransaction = true; } finally { decrementCallCount(); session.endOperationProfile(SessionProfiler.Transaction); } }
/** * Begin a transaction on the database. If not using managed transaction begin a local transaction. */ public void beginTransaction(AbstractSession session) throws DatabaseException { if (usesExternalTransactionController()) { if (session.isExclusiveConnectionRequired() && !this.isInTransaction && this.usesExternalConnectionPooling) { closeConnection(); } this.isInTransaction = true; return; } session.log(SessionLog.FINER, SessionLog.TRANSACTION, "begin_transaction", (Object[])null, this); try { session.startOperationProfile(SessionProfiler.Transaction); incrementCallCount(session); basicBeginTransaction(session); this.isInTransaction = true; } finally { decrementCallCount(); session.endOperationProfile(SessionProfiler.Transaction); } }