Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.4 $
See Also:
  Serialized Form

Field Summary
`static byte` | `FINISHED_STATE`
`static byte` | `IN_USE_STATE`
`static byte` | `PREPARED_STATE`
`static byte` | `START_STATE`

Constructor Summary
`protected` | `AbstractTransaction(Broker broker)`

Method Summary
`void` | `addPostCommitTask(TransactionTask r)`
`void` | `addPostRollbackTask(TransactionTask r)`
`void` | `addPrePrepareTask(TransactionTask r)`
`Broker` | `getBroker()`
`byte` | `getState()`
`protected void` | `postCommit()`
`void` | `postRollback()`
`void` | `prePrepare()`
`void` | `readExternal(ObjectInput in)`
`protected TransactionTask` | `readTask(ObjectInput in)`
`protected ArrayList` | `readTaskList(ObjectInput in)`
`void` | `setBroker(Broker broker)` Called after deserialization to register the broker
`void` | `setState(byte state)`
`String` | `toString()`
`void` | `writeExternal(ObjectOutput out)`
`protected void` | `writeTask(TransactionTask task, ObjectOutput out)`
`protected void` | `writeTaskList(ArrayList tasks, ObjectOutput out)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.codehaus.activemq.service.Transaction
`commit, prepare, rollback`

Field Detail

### 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

Constructor Detail

### AbstractTransaction

    protected AbstractTransaction(Broker broker)

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Protique, Ltd.. All Rights Reserved.