org.codehaus.activemq.service.impl
Class AbstractTransaction
java.lang.Object
org.codehaus.activemq.service.impl.AbstractTransaction
- All Implemented Interfaces:
- Externalizable, Serializable, Transaction
- Direct Known Subclasses:
- LocalTransactionCommand, XATransactionCommand
- public abstract class AbstractTransaction
- extends Object
- implements Transaction, Externalizable
Keeps track of all the actions the need to be done when
a transaction does a commit or rollback.
- Version:
- $Revision: 1.1 $
- See Also:
- Serialized Form
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
AbstractTransaction
protected AbstractTransaction(Broker broker)
getBroker
public Broker getBroker()
setBroker
public void setBroker(Broker broker)
- Called after deserialization to register the broker
- Specified by:
setBroker
in interface Transaction
- Parameters:
broker
-
getState
public byte getState()
setState
public void setState(byte state)
addPostCommitTask
public void addPostCommitTask(TransactionTask r)
- Specified by:
addPostCommitTask
in interface Transaction
addPostRollbackTask
public void addPostRollbackTask(TransactionTask r)
- Specified by:
addPostRollbackTask
in interface Transaction
addPrePrepareTask
public void addPrePrepareTask(TransactionTask r)
- Specified by:
addPrePrepareTask
in interface Transaction
prePrepare
public void prePrepare()
throws Throwable
- Throws:
Throwable
postCommit
protected void postCommit()
throws Throwable
- Throws:
Throwable
postRollback
public void postRollback()
throws Throwable
- Throws:
Throwable
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal
in interface Externalizable
- Throws:
IOException
ClassNotFoundException
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal
in interface Externalizable
- Throws:
IOException
toString
public String toString()
readTaskList
protected ArrayList readTaskList(ObjectInput in)
throws IOException
- Throws:
IOException
writeTaskList
protected void writeTaskList(ArrayList tasks,
ObjectOutput out)
throws IOException
- Throws:
IOException
readTask
protected TransactionTask readTask(ObjectInput in)
throws IOException
- Throws:
IOException
writeTask
protected void writeTask(TransactionTask task,
ObjectOutput out)
throws IOException
- Throws:
IOException
Copyright © 2004-2005 Protique, Ltd.. All Rights Reserved.