public class CompositeTransactionManagerImp extends java.lang.Object implements CompositeTransactionManager, SubTxAwareParticipant
Constructor and Description |
---|
CompositeTransactionManagerImp() |
Modifier and Type | Method and Description |
---|---|
void |
committed(CompositeTransaction tx)
Called if a tx is ended successfully.
|
CompositeTransaction |
createCompositeTransaction(long timeout) |
CompositeTransaction |
getCompositeTransaction() |
CompositeTransaction |
getCompositeTransaction(java.lang.String tid) |
CompositeTransaction |
recreateCompositeTransaction(Propagation context)
Recreate a composite transaction based on an imported context.
|
void |
resume(CompositeTransaction ct) |
void |
rolledback(CompositeTransaction tx)
Called if a tx is ended with failure.
|
void |
shutdown(boolean force)
Shut down the server in a clean way.
|
protected void |
startlistening(CompositeTransaction transaction) |
CompositeTransaction |
suspend() |
public void committed(CompositeTransaction tx)
committed
in interface SubTxAwareParticipant
SubTxAwareParticipant
public void rolledback(CompositeTransaction tx)
rolledback
in interface SubTxAwareParticipant
SubTxAwareParticipant
public CompositeTransaction getCompositeTransaction() throws SysException
getCompositeTransaction
in interface CompositeTransactionManager
SysException
CompositeTransactionManager
public CompositeTransaction getCompositeTransaction(java.lang.String tid) throws SysException
getCompositeTransaction
in interface CompositeTransactionManager
SysException
CompositeTransactionManager
public CompositeTransaction recreateCompositeTransaction(Propagation context) throws SysException
recreateCompositeTransaction
in interface CompositeTransactionManager
context
- The propagationcontext.SysException
- Failure.public CompositeTransaction suspend() throws SysException
suspend
in interface CompositeTransactionManager
SysException
CompositeTransactionManager
public void resume(CompositeTransaction ct) throws java.lang.IllegalStateException, SysException
resume
in interface CompositeTransactionManager
java.lang.IllegalStateException
SysException
CompositeTransactionManager
public void shutdown(boolean force) throws SysException, java.lang.IllegalStateException
force
- If true, shutdown will not wait for possibly indoubt txs to
finish. Calling shutdown with force being true implies that
shutdown will not fail, but there may be remaining timer
threads that stay asleep until there timeouts expire. Such
remaining active transactions will NOT be able to finish,
because the recovery manager will be shutdown by that time.
New transactions will not be allowed.SysException
- For unexpected errors.java.lang.IllegalStateException
- If active txs exist, and not force.protected void startlistening(CompositeTransaction transaction) throws SysException
SysException
public CompositeTransaction createCompositeTransaction(long timeout) throws SysException
createCompositeTransaction
in interface CompositeTransactionManager
SysException
CompositeTransactionManager
Copyright © 2020. All Rights Reserved.