Search in sources :

Example 26 with TransactionFailureException

use of org.neo4j.kernel.api.exceptions.TransactionFailureException in project neo4j by neo4j.

the class TransitionalTxManagementKernelTransaction method commit.

public void commit() {
    try {
        KernelTransaction kernelTransactionBoundToThisThread = bridge.getKernelTransactionBoundToThisThread(true);
        kernelTransactionBoundToThisThread.success();
        kernelTransactionBoundToThisThread.close();
    } catch (TransactionFailureException e) {
        throw new RuntimeException(e);
    } finally {
        bridge.unbindTransactionFromCurrentThread();
    }
}
Also used : KernelTransaction(org.neo4j.kernel.api.KernelTransaction) TransactionFailureException(org.neo4j.kernel.api.exceptions.TransactionFailureException)

Aggregations

TransactionFailureException (org.neo4j.kernel.api.exceptions.TransactionFailureException)26 Test (org.junit.Test)11 KernelTransaction (org.neo4j.kernel.api.KernelTransaction)10 IOException (java.io.IOException)5 TransientTransactionFailureException (org.neo4j.graphdb.TransientTransactionFailureException)4 TransactionToApply (org.neo4j.kernel.impl.api.TransactionToApply)4 CreateConstraintFailureException (org.neo4j.kernel.api.exceptions.schema.CreateConstraintFailureException)3 StorageEngine (org.neo4j.storageengine.api.StorageEngine)3 ArrayList (java.util.ArrayList)2 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)2 RequestContext (org.neo4j.com.RequestContext)2 Statement (org.neo4j.kernel.api.Statement)2 ConstraintValidationException (org.neo4j.kernel.api.exceptions.schema.ConstraintValidationException)2 TransactionCommitProcess (org.neo4j.kernel.impl.api.TransactionCommitProcess)2 TransactionRepresentation (org.neo4j.kernel.impl.transaction.TransactionRepresentation)2 StorageCommand (org.neo4j.storageengine.api.StorageCommand)2 ExecutionException (java.util.concurrent.ExecutionException)1 ThreadLocalRandom (java.util.concurrent.ThreadLocalRandom)1 AtomicReferenceArray (java.util.concurrent.atomic.AtomicReferenceArray)1 CatchupPollingProcess (org.neo4j.causalclustering.catchup.tx.CatchupPollingProcess)1