Examples of TransactionFailureException


Examples of org.neo4j.graphdb.TransactionFailureException

        {
            transactionManager.getTransaction().setRollbackOnly();
        }
        catch ( Exception e )
        {
            throw new TransactionFailureException(
                "Failed to mark transaction as rollback only.", e );
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

                }
            }
        }
        catch ( RollbackException e )
        {
            throw new TransactionFailureException( "Unable to commit transaction", e );
        }
        catch ( Exception e )
        {
            if ( success )
            {
                throw new TransactionFailureException(
                    "Unable to commit transaction", e );
            }
            else
            {
                throw new TransactionFailureException(
                    "Unable to rollback transaction", e );
            }
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

        {
            return config.getTxModule().getTxManager().getTransaction() != null;
        }
        catch ( Exception e )
        {
            throw new TransactionFailureException(
                    "Unable to get transaction.", e );
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

    {
        XaDataSourceManager xaDsMgr = xaDsManager;
        String name = dsName.toLowerCase();
        if ( xaDsMgr.hasDataSource( name ) )
        {
            throw new TransactionFailureException( "Data source[" + name
                + "] has already been registered" );
        }
        try
        {
            XaDataSource dataSource = xaDsMgr.create( className, params );
            xaDsMgr.registerDataSource( name, dataSource, resourceId );
            return dataSource;
        }
        catch ( Exception e )
        {
            throw new TransactionFailureException(
                "Could not create data source [" + name
                + "], see nested exception for cause of error", e.getCause() );
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

        {
            if ( useExisting )
            {
                return xaDsMgr.getXaDataSource( name );
            }
            throw new TransactionFailureException( "Data source[" + name
                + "] has already been registered" );
        }
        try
        {
            XaDataSource dataSource = xaDsMgr.create( className, params );
            xaDsMgr.registerDataSource( name, dataSource, resourceId );
            return dataSource;
        }
        catch ( Exception e )
        {
            throw new TransactionFailureException(
                "Could not create data source " + name + "[" + name + "]", e );
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

     */
    public final void addCommand( XaCommand command )
    {
        if ( committed )
        {
            throw new TransactionFailureException(
                "Cannot add command to committed transaction" );
        }
        if ( rolledback )
        {
            throw new TransactionFailureException(
                "Cannot add command to rolled back transaction" );
        }
        doAddCommand( command );
        try
        {
            log.writeCommand( command, identifier );
        }
        catch ( IOException e )
        {
            throw new TransactionFailureException(
                "Unable to write command to logical log.", e );
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

                    return sourceIdMapping.get( name );
                }
            }
            catch ( XAException e )
            {
                throw new TransactionFailureException(
                    "Unable to check is same resource", e );
            }
        }
        throw new TransactionFailureException(
            "Unable to find mapping for XAResource[" + xaResource + "]" );
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

    synchronized XAResource getXaResource( byte branchId[] )
    {
        XaDataSource dataSource = branchIdMapping.get( UTF8.decode( branchId ) );
        if ( dataSource == null )
        {
            throw new TransactionFailureException(
                "No mapping found for branchId[0x" +
                UTF8.decode( branchId ) + "]" );
        }
        return dataSource.getXaConnection().getXaResource();
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

        {
            transactionManager.begin();
        }
        catch ( NotSupportedException e )
        {
            throw new TransactionFailureException(
                "Unable to begin transaction.", e );
        }
        catch ( SystemException e )
        {
            throw new TransactionFailureException(
                "Unable to begin transaction.", e );
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

        {
            transactionManager.commit();
        }
        catch ( SecurityException e )
        {
            throw new TransactionFailureException( "Failed to commit.", e );
        }
        catch ( IllegalStateException e )
        {
            throw new TransactionFailureException( "Failed to commit.", e );
        }
        catch ( RollbackException e )
        {
            throw new TransactionFailureException( "Failed to commit.", e );
        }
        catch ( HeuristicMixedException e )
        {
            throw new TransactionFailureException( "Failed to commit.", e );
        }
        catch ( HeuristicRollbackException e )
        {
            throw new TransactionFailureException( "Failed to commit.", e );
        }
        catch ( SystemException e )
        {
            throw new TransactionFailureException( "Failed to commit.", e );
        }
    }
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.