Java 类org.springframework.transaction.TransactionUsageException 实例源码

项目:lams    文件:AbstractTransactionStatus.java   
/**
 * 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);
}
项目:lams    文件:AbstractTransactionStatus.java   
/**
 * 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);
}
项目:lams    文件:JdbcTransactionObjectSupport.java   
protected ConnectionHolder getConnectionHolderForSavepoint() throws TransactionException {
    if (!isSavepointAllowed()) {
        throw new NestedTransactionNotSupportedException(
                "Transaction manager does not allow nested transactions");
    }
    if (!hasConnectionHolder()) {
        throw new TransactionUsageException(
                "Cannot create nested transaction if not exposing a JDBC transaction");
    }
    return getConnectionHolder();
}
项目:spring4-understanding    文件:AbstractTransactionStatus.java   
/**
 * Roll back to the savepoint that is held for the transaction
 * and release the savepoint right afterwards.
 */
public void rollbackToHeldSavepoint() throws TransactionException {
    if (!hasSavepoint()) {
        throw new TransactionUsageException(
                "Cannot roll back to savepoint - no savepoint associated with current transaction");
    }
    getSavepointManager().rollbackToSavepoint(getSavepoint());
    getSavepointManager().releaseSavepoint(getSavepoint());
    setSavepoint(null);
}
项目:spring4-understanding    文件:AbstractTransactionStatus.java   
/**
 * Release the savepoint that is held for the transaction.
 */
public void releaseHeldSavepoint() throws TransactionException {
    if (!hasSavepoint()) {
        throw new TransactionUsageException(
                "Cannot release savepoint - no savepoint associated with current transaction");
    }
    getSavepointManager().releaseSavepoint(getSavepoint());
    setSavepoint(null);
}
项目:spring4-understanding    文件:JdbcTransactionObjectSupport.java   
protected ConnectionHolder getConnectionHolderForSavepoint() throws TransactionException {
    if (!isSavepointAllowed()) {
        throw new NestedTransactionNotSupportedException(
                "Transaction manager does not allow nested transactions");
    }
    if (!hasConnectionHolder()) {
        throw new TransactionUsageException(
                "Cannot create nested transaction if not exposing a JDBC transaction");
    }
    return getConnectionHolder();
}
项目:class-guard    文件:AbstractTransactionStatus.java   
/**
 * 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);
}
项目:class-guard    文件:AbstractTransactionStatus.java   
/**
 * 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);
}
项目:class-guard    文件:JdbcTransactionObjectSupport.java   
protected ConnectionHolder getConnectionHolderForSavepoint() throws TransactionException {
    if (!isSavepointAllowed()) {
        throw new NestedTransactionNotSupportedException(
                "Transaction manager does not allow nested transactions");
    }
    if (!hasConnectionHolder()) {
        throw new TransactionUsageException(
                "Cannot create nested transaction if not exposing a JDBC transaction");
    }
    return getConnectionHolder();
}