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:
  java.io.Externalizable, java.io.Serializable, Transaction

Direct Known Subclasses:
  XATransactionCommand

public abstract class AbstractTransaction
extends java.lang.Object
implements Transaction, java.io.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(java.io.ObjectInput in)`
`protected TransactionTask` | `readTask(java.io.ObjectInput in)`
`protected java.util.ArrayList` | `readTaskList(java.io.ObjectInput in)`
`void` | `setBroker(Broker broker)` Called after deserialization to register the broker
`void` | `setState(byte state)`
`java.lang.String` | `toString()`
`void` | `writeExternal(java.io.ObjectOutput out)`
`protected void` | `writeTask(TransactionTask task, java.io.ObjectOutput out)`
`protected void` | `writeTaskList(java.util.ArrayList tasks, java.io.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 java.lang.Throwable

  Throws:
    `java.lang.Throwable`

### postCommit

    protected void postCommit()
                       throws java.lang.Throwable

  Throws:
    `java.lang.Throwable`

### postRollback

    public void postRollback()
                      throws java.lang.Throwable

  Throws:
    `java.lang.Throwable`

### readExternal

    public void readExternal(java.io.ObjectInput in)
                      throws java.io.IOException,
                             java.lang.ClassNotFoundException

  Specified by:
    `readExternal` in interface `java.io.Externalizable`
  Throws:
    `java.io.IOException`
    `java.lang.ClassNotFoundException`

### writeExternal

    public void writeExternal(java.io.ObjectOutput out)
                       throws java.io.IOException

  Specified by:
    `writeExternal` in interface `java.io.Externalizable`
  Throws:
    `java.io.IOException`

### toString

    public java.lang.String toString()

### readTaskList

    protected java.util.ArrayList readTaskList(java.io.ObjectInput in)
                                        throws java.io.IOException

  Throws:
    `java.io.IOException`

### writeTaskList

    protected void writeTaskList(java.util.ArrayList tasks,
                                 java.io.ObjectOutput out)
                          throws java.io.IOException

  Throws:
    `java.io.IOException`

### readTask

    protected TransactionTask readTask(java.io.ObjectInput in)
                                throws java.io.IOException

  Throws:
    `java.io.IOException`

### writeTask

    protected void writeTask(TransactionTask task,
                             java.io.ObjectOutput out)
                      throws java.io.IOException

  Throws:
    `java.io.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.