|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Transaction
A managed transaction meant as interface to the user.
Should be used to combine multiple resource managers into a complex transaction. Once a resource manager has joined such a complex transaction all transactional control is performed by this transaction. Do not call transactional methods on the resource managers directly.
This is a light weight replacement for a complex 2PC xa transaction.
DefaultTransaction| Method Summary | |
|---|---|
void |
commit()
Commits the complex transaction meaning that all changes made to participating resource managers are made permanent. |
void |
enlistResourceManager(ManageableResourceManager resourceManager)
Adds a resource manager to this complex transaction. |
boolean |
isRollbackOnly()
Checks whether this transaction allows a rollback as the only valid outcome. |
void |
rollback()
Rolls back the complex transaction meaning that all changes made to participating resource managers are undone. |
void |
start(long timeout,
TimeUnit unit)
Starts a new transactions having a specific timeout. |
| Method Detail |
|---|
void start(long timeout,
TimeUnit unit)
add resource managers
before start or afterwards.
timeout - the maximum time this transaction can run before it times outunit - the time unit of the timeout argumentboolean isRollbackOnly()
true if this transaction can only rolled backvoid rollback()
void commit()
void enlistResourceManager(ManageableResourceManager resourceManager)
resourceManager - the resource manager to add
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||