/** * Release the savepoint that is held for the transaction. */ public void releaseHeldSavepoint() throws TransactionException { Object savepoint = getSavepoint(); if (savepoint == null) { throw new TransactionUsageException( "Cannot release savepoint - no savepoint associated with current transaction"); } getSavepointManager().releaseSavepoint(savepoint); setSavepoint(null); }
/** * Determine the rollback-only flag via checking both the local rollback-only flag * of this TransactionStatus and the global rollback-only flag of the underlying * transaction, if any. * @see #isLocalRollbackOnly() * @see #isGlobalRollbackOnly() */ @Override public boolean isRollbackOnly() { return (isLocalRollbackOnly() || isGlobalRollbackOnly()); }
/** * Create a savepoint and hold it for the transaction. * @throws org.springframework.transaction.NestedTransactionNotSupportedException * if the underlying transaction does not support savepoints */ public void createAndHoldSavepoint() throws TransactionException { setSavepoint(getSavepointManager().createSavepoint()); }
/** * Roll back to the savepoint that is held for the transaction. */ public void rollbackToHeldSavepoint() throws TransactionException { if (!hasSavepoint()) { throw new TransactionUsageException("No savepoint associated with current transaction"); } getSavepointManager().rollbackToSavepoint(getSavepoint()); setSavepoint(null); }
/** * This implementation delegates to a SavepointManager for the * underlying transaction, if possible. * @see #getSavepointManager() * @see SavepointManager#createSavepoint() */ @Override public Object createSavepoint() throws TransactionException { return getSavepointManager().createSavepoint(); }
/** * Release the savepoint that is held for the transaction. */ public void releaseHeldSavepoint() throws TransactionException { if (!hasSavepoint()) { throw new TransactionUsageException("No savepoint associated with current transaction"); } getSavepointManager().releaseSavepoint(getSavepoint()); setSavepoint(null); }
/** * Create a savepoint and hold it for the transaction. * @throws org.springframework.transaction.NestedTransactionNotSupportedException * if the underlying transaction does not support savepoints */ public void createAndHoldSavepoint() throws TransactionException { setSavepoint(getSavepointManager().createSavepoint()); }
/** * This implementation delegates to a SavepointManager for the * underlying transaction, if possible. * @see #getSavepointManager() * @see SavepointManager#rollbackToSavepoint(Object) */ @Override public void rollbackToSavepoint(Object savepoint) throws TransactionException { getSavepointManager().rollbackToSavepoint(savepoint); }
/** * Roll back to the savepoint that is held for the transaction * and release the savepoint right afterwards. */ public void rollbackToHeldSavepoint() throws TransactionException { Object savepoint = getSavepoint(); if (savepoint == null) { throw new TransactionUsageException( "Cannot roll back to savepoint - no savepoint associated with current transaction"); } getSavepointManager().rollbackToSavepoint(savepoint); getSavepointManager().releaseSavepoint(savepoint); setSavepoint(null); }
/** * Determine the rollback-only flag via checking both the local rollback-only flag * of this TransactionStatus and the global rollback-only flag of the underlying * transaction, if any. * @see #isLocalRollbackOnly() * @see #isGlobalRollbackOnly() */ @Override public boolean isRollbackOnly() { return (isLocalRollbackOnly() || isGlobalRollbackOnly()); }
/** * Create a savepoint and hold it for the transaction. * @throws org.springframework.transaction.NestedTransactionNotSupportedException * if the underlying transaction does not support savepoints */ public void createAndHoldSavepoint() throws TransactionException { setSavepoint(getSavepointManager().createSavepoint()); }
/** * This implementation delegates to a SavepointManager for the * underlying transaction, if possible. * @see #getSavepointManager() * @see SavepointManager#releaseSavepoint(Object) */ @Override public void releaseSavepoint(Object savepoint) throws TransactionException { getSavepointManager().releaseSavepoint(savepoint); }
/** * Release the savepoint that is held for the transaction. */ public void releaseHeldSavepoint() throws TransactionException { Object savepoint = getSavepoint(); if (savepoint == null) { throw new TransactionUsageException( "Cannot release savepoint - no savepoint associated with current transaction"); } getSavepointManager().releaseSavepoint(savepoint); setSavepoint(null); }
/** * Determine the rollback-only flag via checking both the local rollback-only flag * of this TransactionStatus and the global rollback-only flag of the underlying * transaction, if any. * @see #isLocalRollbackOnly() * @see #isGlobalRollbackOnly() */ @Override public boolean isRollbackOnly() { return (isLocalRollbackOnly() || isGlobalRollbackOnly()); }
/** * Create a savepoint and hold it for the transaction. * @throws org.springframework.transaction.NestedTransactionNotSupportedException * if the underlying transaction does not support savepoints */ public void createAndHoldSavepoint() throws TransactionException { setSavepoint(getSavepointManager().createSavepoint()); }
/** * This implementation delegates to a SavepointManager for the * underlying transaction, if possible. * @see #getSavepointManager() * @see SavepointManager#releaseSavepoint(Object) */ @Override public void releaseSavepoint(Object savepoint) throws TransactionException { getSavepointManager().releaseSavepoint(savepoint); }
/** * Roll back to the savepoint that is held for the transaction * and release the savepoint right afterwards. */ public void rollbackToHeldSavepoint() throws TransactionException { Object savepoint = getSavepoint(); if (savepoint == null) { throw new TransactionUsageException( "Cannot roll back to savepoint - no savepoint associated with current transaction"); } getSavepointManager().rollbackToSavepoint(savepoint); getSavepointManager().releaseSavepoint(savepoint); setSavepoint(null); }
/** * Determine the rollback-only flag via checking both the local rollback-only flag * of this TransactionStatus and the global rollback-only flag of the underlying * transaction, if any. * @see #isLocalRollbackOnly() * @see #isGlobalRollbackOnly() */ @Override public boolean isRollbackOnly() { return (isLocalRollbackOnly() || isGlobalRollbackOnly()); }
/** * Create a savepoint and hold it for the transaction. * @throws org.springframework.transaction.NestedTransactionNotSupportedException * if the underlying transaction does not support savepoints */ public void createAndHoldSavepoint() throws TransactionException { setSavepoint(getSavepointManager().createSavepoint()); }
/** * This implementation delegates to a SavepointManager for the * underlying transaction, if possible. * @see #getSavepointManager() * @see SavepointManager#createSavepoint() */ @Override public Object createSavepoint() throws TransactionException { return getSavepointManager().createSavepoint(); }