/** * Return true if some external transaction service is controlling transactions. */ public boolean usesExternalTransactionController() { if (this.login == null) { throw DatabaseException.databaseAccessorNotConnected(); } return this.login.shouldUseExternalTransactionController(); }
/** * Return true if some external transaction service is controlling transactions. */ public boolean usesExternalTransactionController() { if (this.login == null) { throw DatabaseException.databaseAccessorNotConnected(); } return this.login.shouldUseExternalTransactionController(); }
/** * Return true if some external transaction service is controlling transactions. */ public boolean usesExternalTransactionController() { if (this.login == null) { throw DatabaseException.databaseAccessorNotConnected(); } return this.login.shouldUseExternalTransactionController(); }
/** * INTERNAL: * Called by beginTransaction() to start a transaction. * This starts a real database transaction. * Allows retry if the connection is dead. */ protected void basicBeginTransaction(Accessor accessor) throws DatabaseException { try { accessor.beginTransaction(this); } catch (DatabaseException databaseException) { // Retry if the failure was communication based? (i.e. timeout, database down, can no longer ping) if ((!getDatasourceLogin().shouldUseExternalTransactionController()) && databaseException.isCommunicationFailure()) { DatabaseException exceptionToThrow = databaseException; Object[] args = new Object[1]; args[0] = databaseException; log(SessionLog.INFO, SessionLog.TRANSACTION, "communication_failure_attempting_begintransaction_retry", args, null); // Attempt to reconnect connection. exceptionToThrow = retryTransaction(accessor, databaseException, 0, this); if (exceptionToThrow == null) { // Retry was a success. return; } handleException(exceptionToThrow); } else { handleException(databaseException); } } catch (RuntimeException exception) { handleException(exception); } }
/** * INTERNAL: * Called by beginTransaction() to start a transaction. * This starts a real database transaction. * Allows retry if the connection is dead. */ protected void basicBeginTransaction(Accessor accessor) throws DatabaseException { try { accessor.beginTransaction(this); } catch (DatabaseException databaseException) { // Retry if the failure was communication based? (i.e. timeout, database down, can no longer ping) if ((!getDatasourceLogin().shouldUseExternalTransactionController()) && databaseException.isCommunicationFailure()) { DatabaseException exceptionToThrow = databaseException; Object[] args = new Object[1]; args[0] = databaseException; log(SessionLog.INFO, SessionLog.TRANSACTION, "communication_failure_attempting_begintransaction_retry", args, null); // Attempt to reconnect connection. exceptionToThrow = retryTransaction(accessor, databaseException, 0, this); if (exceptionToThrow == null) { // Retry was a success. return; } handleException(exceptionToThrow); } else { handleException(databaseException); } } catch (RuntimeException exception) { handleException(exception); } }
if (!getOwnerSession().getDatasourceLogin().shouldUseExternalTransactionController() && !writeSession.isInTransaction()) {
if (!getOwnerSession().getDatasourceLogin().shouldUseExternalTransactionController() && !writeSession.isInTransaction()) {
if (!getOwnerSession().getDatasourceLogin().shouldUseExternalTransactionController() && !writeSession.isInTransaction()) {
if (!session.getDatasourceLogin().shouldUseExternalTransactionController()) { session.getServerPlatform().disableJTA();
if (getLogin().shouldUseExternalTransactionController()) { throw ValidationException.invalidSequencingLogin();
if (getLogin().shouldUseExternalTransactionController()) { throw ValidationException.invalidSequencingLogin();
if (getLogin().shouldUseExternalTransactionController()) { throw ValidationException.invalidSequencingLogin();