@java.lang.SuppressWarnings("serial")
public class DatastoreTransactionManager
extends AbstractPlatformTransactionManager
A PlatformTransactionManager instance that works with the Spring datastore abstraction.
A transaction started while another is in progress on the session the thread is using joins it
(PROPAGATION_REQUIRED, SUPPORTS, MANDATORY): the outer transaction commits
or rolls back everything once, and a joined transaction that fails marks the whole one
rollback-only. A session bound on top of it (withNewSession) runs transactions of its
own. PROPAGATION_REQUIRES_NEW suspends the outer transaction and runs in a session of its
own; PROPAGATION_NESTED is not supported. A read-write transaction started inside a read-only
one joins it and is read-only, as on Hibernate: the read-only commit does not flush, and warns when
that leaves writes unpersisted. Set validateExistingTransaction to refuse such a join
instead. Once a transaction has committed or rolled back it cannot be joined: transactional code
run from its afterCommit or afterCompletion callbacks begins a transaction of its
own.
| Fields inherited from class | Fields |
|---|---|
class AbstractPlatformTransactionManager |
SYNCHRONIZATION_ALWAYS, SYNCHRONIZATION_ON_ACTUAL_TRANSACTION, SYNCHRONIZATION_NEVER |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected void |
doBegin(java.lang.Object o, TransactionDefinition definition) |
|
protected void |
doCleanupAfterCompletion(java.lang.Object transaction) |
|
protected void |
doCommit(DefaultTransactionStatus status) |
|
protected java.lang.Object |
doGetTransaction() |
|
protected void |
doResume(java.lang.Object transaction, java.lang.Object suspendedResources) |
|
protected void |
doRollback(DefaultTransactionStatus status) |
|
protected void |
doSetRollbackOnly(DefaultTransactionStatus status) |
|
protected java.lang.Object |
doSuspend(java.lang.Object transaction) |
|
public Datastore |
getDatastore() |
|
protected boolean |
isExistingTransaction(java.lang.Object transaction) |
|
public void |
setDatastore(Datastore datastore) |
|
public void |
setDatastoreManagedSession(boolean datastoreManagedSession) |