org.apache.activemq.transaction
Class Transaction
java.lang.Object
org.apache.activemq.transaction.Transaction
- Direct Known Subclasses:
- LocalTransaction, XATransaction
public abstract class Transaction
- extends Object
Keeps track of all the actions the need to be done when a transaction does a
commit or rollback.
- Version:
- $Revision: 1.5 $
START_STATE
public static final byte START_STATE
- See Also:
- Constant Field Values
IN_USE_STATE
public static final byte IN_USE_STATE
- See Also:
- Constant Field Values
PREPARED_STATE
public static final byte PREPARED_STATE
- See Also:
- Constant Field Values
FINISHED_STATE
public static final byte FINISHED_STATE
- See Also:
- Constant Field Values
Transaction
public Transaction()
getState
public byte getState()
setState
public void setState(byte state)
addSynchronization
public void addSynchronization(Synchronization r)
removeSynchronization
public void removeSynchronization(Synchronization r)
prePrepare
public void prePrepare()
throws Exception
- Throws:
Exception
fireAfterCommit
protected void fireAfterCommit()
throws Exception
- Throws:
Exception
fireAfterRollback
public void fireAfterRollback()
throws Exception
- Throws:
Exception
toString
public String toString()
- Overrides:
toString
in class Object
commit
public abstract void commit(boolean onePhase)
throws XAException,
IOException
- Throws:
XAException
IOException
rollback
public abstract void rollback()
throws XAException,
IOException
- Throws:
XAException
IOException
prepare
public abstract int prepare()
throws XAException,
IOException
- Throws:
XAException
IOException
getTransactionId
public abstract TransactionId getTransactionId()
isPrepared
public boolean isPrepared()
size
public int size()
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.