@API(status=STABLE,
since="6.0")
public class Neo4jTransactionManager
extends AbstractPlatformTransactionManager
PlatformTransactionManager for native Neo4j transactions. This
transaction manager will synchronize a pair of a native Neo4j session/transaction with the transaction.AbstractPlatformTransactionManager.SuspendedResourcesHolderlogger, SYNCHRONIZATION_ALWAYS, SYNCHRONIZATION_NEVER, SYNCHRONIZATION_ON_ACTUAL_TRANSACTION| Constructor and Description |
|---|
Neo4jTransactionManager(org.neo4j.driver.Driver driver) |
Neo4jTransactionManager(org.neo4j.driver.Driver driver,
DatabaseSelectionProvider databaseSelectionProvider) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doBegin(Object transaction,
TransactionDefinition definition) |
protected void |
doCleanupAfterCompletion(Object transaction) |
protected void |
doCommit(DefaultTransactionStatus status) |
protected Object |
doGetTransaction() |
protected void |
doResume(Object transaction,
Object suspendedResources) |
protected void |
doRollback(DefaultTransactionStatus status) |
protected void |
doSetRollbackOnly(DefaultTransactionStatus status) |
protected Object |
doSuspend(Object transaction) |
protected boolean |
isExistingTransaction(Object transaction) |
static org.neo4j.driver.Transaction |
retrieveTransaction(org.neo4j.driver.Driver driver,
String targetDatabase)
This methods provides a native Neo4j transaction to be used from within a
Neo4jClient. |
commit, determineTimeout, getDefaultTimeout, getTransaction, getTransactionSynchronization, invokeAfterCompletion, isFailEarlyOnGlobalRollbackOnly, isGlobalRollbackOnParticipationFailure, isNestedTransactionAllowed, isRollbackOnCommitFailure, isValidateExistingTransaction, newTransactionStatus, prepareForCommit, prepareSynchronization, prepareTransactionStatus, registerAfterCompletionWithExistingTransaction, resume, rollback, setDefaultTimeout, setFailEarlyOnGlobalRollbackOnly, setGlobalRollbackOnParticipationFailure, setNestedTransactionAllowed, setRollbackOnCommitFailure, setTransactionSynchronization, setTransactionSynchronizationName, setValidateExistingTransaction, shouldCommitOnGlobalRollbackOnly, suspend, triggerBeforeCommit, triggerBeforeCompletion, useSavepointForNestedTransactionpublic Neo4jTransactionManager(org.neo4j.driver.Driver driver)
public Neo4jTransactionManager(org.neo4j.driver.Driver driver,
DatabaseSelectionProvider databaseSelectionProvider)
@Nullable public static org.neo4j.driver.Transaction retrieveTransaction(org.neo4j.driver.Driver driver, @Nullable String targetDatabase)
Neo4jClient. In most cases this
the native transaction will be controlled from the Neo4j specific
PlatformTransactionManager. However, SDN provides support for other
transaction managers as well. This methods registers a session synchronization in such cases on the foreign
transaction manager.driver - The driver that has been used as a synchronization object.targetDatabase - The target databaseprotected Object doGetTransaction() throws TransactionException
doGetTransaction in class AbstractPlatformTransactionManagerTransactionExceptionprotected boolean isExistingTransaction(Object transaction) throws TransactionException
isExistingTransaction in class AbstractPlatformTransactionManagerTransactionExceptionprotected void doBegin(Object transaction, TransactionDefinition definition) throws TransactionException
doBegin in class AbstractPlatformTransactionManagerTransactionExceptionprotected Object doSuspend(Object transaction) throws TransactionException
doSuspend in class AbstractPlatformTransactionManagerTransactionExceptionprotected void doResume(@Nullable Object transaction, Object suspendedResources)
doResume in class AbstractPlatformTransactionManagerprotected void doCommit(DefaultTransactionStatus status) throws TransactionException
doCommit in class AbstractPlatformTransactionManagerTransactionExceptionprotected void doRollback(DefaultTransactionStatus status) throws TransactionException
doRollback in class AbstractPlatformTransactionManagerTransactionExceptionprotected void doSetRollbackOnly(DefaultTransactionStatus status) throws TransactionException
doSetRollbackOnly in class AbstractPlatformTransactionManagerTransactionExceptionprotected void doCleanupAfterCompletion(Object transaction)
doCleanupAfterCompletion in class AbstractPlatformTransactionManagerCopyright © 2019–2021 Neo4j, Neo4j Sweden AB. All rights reserved.