@Override protected void doRollback(DefaultTransactionStatus status) { CciLocalTransactionObject txObject = (CciLocalTransactionObject) status.getTransaction(); Connection con = txObject.getConnectionHolder().getConnection(); if (status.isDebug()) { logger.debug("Rolling back CCI local transaction on Connection [" + con + "]"); } try { con.getLocalTransaction().rollback(); } catch (LocalTransactionException ex) { throw new TransactionSystemException("Could not roll back CCI local transaction", ex); } catch (ResourceException ex) { throw new TransactionSystemException("Unexpected failure on rollback of CCI local transaction", ex); } }
mockFactory.getMockConnection().getLocalTransaction().begin(); mockFactory.getMockConnection().getLocalTransaction().commit(); module.verifyLocalTransactionCommitted(); module.verifyLocalTransactionNotRolledBack(); mockFactory.getMockConnection().getLocalTransaction().begin(); mockFactory.getMockConnection().getLocalTransaction().rollback(); module.verifyLocalTransactionNotCommitted(); module.verifyLocalTransactionRolledBack();
@Override protected void doCommit(DefaultTransactionStatus status) { CciLocalTransactionObject txObject = (CciLocalTransactionObject) status.getTransaction(); Connection con = txObject.getConnectionHolder().getConnection(); if (status.isDebug()) { logger.debug("Committing CCI local transaction on Connection [" + con + "]"); } try { con.getLocalTransaction().commit(); } catch (LocalTransactionException ex) { throw new TransactionSystemException("Could not commit CCI local transaction", ex); } catch (ResourceException ex) { throw new TransactionSystemException("Unexpected failure on commit of CCI local transaction", ex); } }
connectionHolder.setSynchronizedWithTransaction(true); con.getLocalTransaction().begin(); int timeout = determineTimeout(definition); if (timeout != TransactionDefinition.TIMEOUT_DEFAULT) {
@Override protected void doCommit(DefaultTransactionStatus status) { CciLocalTransactionObject txObject = (CciLocalTransactionObject) status.getTransaction(); Connection con = txObject.getConnectionHolder().getConnection(); if (status.isDebug()) { logger.debug("Committing CCI local transaction on Connection [" + con + "]"); } try { con.getLocalTransaction().commit(); } catch (LocalTransactionException ex) { throw new TransactionSystemException("Could not commit CCI local transaction", ex); } catch (ResourceException ex) { throw new TransactionSystemException("Unexpected failure on commit of CCI local transaction", ex); } }
connectionHolder.setSynchronizedWithTransaction(true); con.getLocalTransaction().begin(); int timeout = determineTimeout(definition); if (timeout != TransactionDefinition.TIMEOUT_DEFAULT) {
@Override protected void doRollback(DefaultTransactionStatus status) { CciLocalTransactionObject txObject = (CciLocalTransactionObject) status.getTransaction(); Connection con = txObject.getConnectionHolder().getConnection(); if (status.isDebug()) { logger.debug("Rolling back CCI local transaction on Connection [" + con + "]"); } try { con.getLocalTransaction().rollback(); } catch (LocalTransactionException ex) { throw new TransactionSystemException("Could not roll back CCI local transaction", ex); } catch (ResourceException ex) { throw new TransactionSystemException("Unexpected failure on rollback of CCI local transaction", ex); } }
/** * Commit the local transaction. */ protected void basicCommitTransaction(AbstractSession session) throws EISException { try { if (getEISPlatform().supportsLocalTransactions()) { getCCIConnection().getLocalTransaction().commit(); } } catch (ResourceException exception) { throw EISException.resourceException(exception, this, session); } }
/** * Begin a local transaction. */ protected void basicBeginTransaction(AbstractSession session) throws EISException { try { if (getEISPlatform().supportsLocalTransactions()) { getCCIConnection().getLocalTransaction().begin(); } } catch (ResourceException exception) { throw EISException.resourceException(exception, this, session); } }
private void handleException(Exception exc, LocalTransaction transaction) { if(null != transaction) { try { transaction.rollback(); } catch(ResourceException txExc) { txExc.printStackTrace(); } } } }
/** * Commit the local transaction. */ protected void basicCommitTransaction(AbstractSession session) throws EISException { try { if (getEISPlatform().supportsLocalTransactions()) { getCCIConnection().getLocalTransaction().commit(); } } catch (ResourceException exception) { throw EISException.resourceException(exception, this, session); } }
/** * Begin a local transaction. */ @Override protected void basicBeginTransaction(AbstractSession session) throws EISException { try { if (getEISPlatform().supportsLocalTransactions()) { getCCIConnection().getLocalTransaction().begin(); } } catch (ResourceException exception) { throw EISException.resourceException(exception, this, session); } }
/** * Rollback the local transaction on the datasource. */ public void basicRollbackTransaction(AbstractSession session) throws DatabaseException { try { if (getEISPlatform().supportsLocalTransactions()) { getCCIConnection().getLocalTransaction().rollback(); } } catch (ResourceException exception) { throw EISException.resourceException(exception, this, session); } }
/** * Commit the local transaction. */ @Override protected void basicCommitTransaction(AbstractSession session) throws EISException { try { if (getEISPlatform().supportsLocalTransactions()) { getCCIConnection().getLocalTransaction().commit(); } } catch (ResourceException exception) { throw EISException.resourceException(exception, this, session); } }
/** * Begin a local transaction. */ protected void basicBeginTransaction(AbstractSession session) throws EISException { try { if (getEISPlatform().supportsLocalTransactions()) { getCCIConnection().getLocalTransaction().begin(); } } catch (ResourceException exception) { throw EISException.resourceException(exception, this, session); } }
/** * Rollback the local transaction on the datasource. */ public void basicRollbackTransaction(AbstractSession session) throws DatabaseException { try { if (getEISPlatform().supportsLocalTransactions()) { getCCIConnection().getLocalTransaction().rollback(); } } catch (ResourceException exception) { throw EISException.resourceException(exception, this, session); } }
@Override protected void doCommit(DefaultTransactionStatus status) { CciLocalTransactionObject txObject = (CciLocalTransactionObject) status.getTransaction(); Connection con = txObject.getConnectionHolder().getConnection(); if (status.isDebug()) { logger.debug("Committing CCI local transaction on Connection [" + con + "]"); } try { con.getLocalTransaction().commit(); } catch (LocalTransactionException ex) { throw new TransactionSystemException("Could not commit CCI local transaction", ex); } catch (ResourceException ex) { throw new TransactionSystemException("Unexpected failure on commit of CCI local transaction", ex); } }