|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.unitofwork.SpringTransactionManager
public class SpringTransactionManager
TransactionManager implementation that uses a PlatformTransactionManager
as
underlying transaction manager.
Constructor Summary | |
---|---|
SpringTransactionManager()
Default constructor. |
|
SpringTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Initializes the SpringTransactionManager with the given transactionManager and the default
transaction definition. |
|
SpringTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager,
org.springframework.transaction.TransactionDefinition transactionDefinition)
|
Method Summary | |
---|---|
void |
commitTransaction(org.springframework.transaction.TransactionStatus tx)
Commits the transaction identifier by given transactionStatus . |
void |
rollbackTransaction(org.springframework.transaction.TransactionStatus tx)
Rolls back the transaction identifier by given transactionStatus . |
void |
setTransactionDefinition(org.springframework.transaction.TransactionDefinition transactionDefinition)
The TransactionDefinition to use by the transaction manager. |
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
The PlatformTransactionManager that manages the transactions with the underlying data source. |
org.springframework.transaction.TransactionStatus |
startTransaction()
Starts a transaction. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpringTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager, org.springframework.transaction.TransactionDefinition transactionDefinition)
transactionManager
- The transaction manager to usetransactionDefinition
- The definition for transactions to createpublic SpringTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
transactionManager
and the default
transaction definition.
transactionManager
- the transaction manager to usepublic SpringTransactionManager()
Method Detail |
---|
public org.springframework.transaction.TransactionStatus startTransaction()
TransactionManager
TransactionManager.commitTransaction(Object)
or TransactionManager.rollbackTransaction(Object)
.
The returned object must never be null
if a transaction was successfully created.
startTransaction
in interface TransactionManager<org.springframework.transaction.TransactionStatus>
public void commitTransaction(org.springframework.transaction.TransactionStatus tx)
TransactionManager
transactionStatus
.
commitTransaction
in interface TransactionManager<org.springframework.transaction.TransactionStatus>
tx
- The status object provided by TransactionManager.startTransaction()
.public void rollbackTransaction(org.springframework.transaction.TransactionStatus tx)
TransactionManager
transactionStatus
.
rollbackTransaction
in interface TransactionManager<org.springframework.transaction.TransactionStatus>
tx
- The status object provided by TransactionManager.startTransaction()
.public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
transactionManager
- the transaction manager that manages transactions with underlying data sourcespublic void setTransactionDefinition(org.springframework.transaction.TransactionDefinition transactionDefinition)
DefaultTransactionDefinition
.
transactionDefinition
- the TransactionDefinition to use by the transaction manager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |