Examples of TransactionException


Examples of org.skife.jdbi.v2.exceptions.TransactionException

        try {
            final Savepoint savepoint = conn.setSavepoint(name);
            localStuff.get(handle).getCheckpoints().put(name, savepoint);
        }
        catch (SQLException e) {
            throw new TransactionException(String.format("Unable to create checkpoint %s", name), e);
        }
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.TransactionException

    {
        final Connection conn = handle.getConnection();
        try {
            final Savepoint savepoint = localStuff.get(handle).getCheckpoints().remove(name);
            if (savepoint == null) {
                throw new TransactionException(String.format("Attempt to rollback to non-existant savepoint, '%s'",
                                                             name));
            }
            conn.releaseSavepoint(savepoint);
        }
        catch (SQLException e) {
            throw new TransactionException(String.format("Unable to create checkpoint %s", name), e);
        }
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.TransactionException

    {
        final Connection conn = handle.getConnection();
        try {
            final Savepoint savepoint = localStuff.get(handle).getCheckpoints().remove(name);
            if (savepoint == null) {
                throw new TransactionException(String.format("Attempt to rollback to non-existant savepoint, '%s'",
                                                             name));
            }
            conn.rollback(savepoint);
        }
        catch (SQLException e) {
            throw new TransactionException(String.format("Unable to create checkpoint %s", name), e);
        }
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.TransactionException

    {
        try {
            return !handle.getConnection().getAutoCommit();
        }
        catch (SQLException e) {
            throw new TransactionException("Failed to test for transaction status", e);
        }
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.TransactionException

     * Called when a transaction is rolled back
     * Will throw a RuntimeException to force transactional rollback
     */
    public void rollback(Handle handle)
    {
        throw new TransactionException("Rollback called, this runtime exception thrown to halt the transaction");
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.TransactionException

        {
            return ! handle.getConnection().getAutoCommit();
        }
        catch (SQLException e)
        {
            throw new TransactionException("Failed to check status of transaction", e);
        }
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.TransactionException

     * @param handle         the handle on which the checkpoint is being released
     * @param checkpointName the checkpoint to release
     */
    public void release(Handle handle, String checkpointName)
    {
        throw new TransactionException("Rollback called, this runtime exception thrown to halt the transaction");
    }
View Full Code Here

Examples of org.springframework.transaction.TransactionException

          (List<DefaultTransactionStatus>) status.getTransaction();

    logger.info("prepare to commit transactions on multiple data sources.");
    Validate.isTrue(list.size() <= this.getTransactionManagers().size());

    TransactionException lastException = null;
    for(int i=list.size()-1; i>=0;i--){
      PlatformTransactionManager transactionManager=this.getTransactionManagers().get(i);
      TransactionStatus localTransactionStatus=list.get(i);
     
      try{
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.