org.objectweb.jotm.core.transaction
Interface TransactionalEvent

All Superinterfaces:
Event
All Known Subinterfaces:
TwoPhaseCommitEvent
All Known Implementing Classes:
AbortEvent, AfterAbortEvent, AfterCommitEvent, AfterCompletionEvent, AfterOnePhaseCommitEvent, AfterPrepareEvent, BeforeAbortEvent, BeforeCommitEvent, BeforeCompletionEvent, BeforeOnePhaseCommitEvent, BeforePrepareEvent, CommitEvent, OnePhaseCommitEvent, PrepareEvent

public interface TransactionalEvent
extends Event

TransactionalEvent reflects an event in a simple transaction. The lifecycle of a transaction (and therefore the sequence of related transactional events) is as follows:

  BEFORE_COMPLETION
  if (commit() is requested) {
    BEFORE_COMMIT
    COMMIT
    AFTER_COMMIT
  }
  if (abort() is requested) {
    BEFORE_ABORT
    ABORT
    AFTER_ABORT
  }
  AFTER_COMPLETION
Notes:


Field Summary
static int TYPE_ABORT
          Abort event.
static int TYPE_AFTER_ABORT
          After-abort event.
static int TYPE_AFTER_COMMIT
          After-commt event.
static int TYPE_AFTER_COMPLETION
          After-completion event.
static int TYPE_BEFORE_ABORT
          Before-abort event.
static int TYPE_BEFORE_COMMIT
          Before-commit event.
static int TYPE_BEFORE_COMPLETION
          Before-completion event.
static int TYPE_COMMIT
          Commit event.
 
Method Summary
 BasicTransaction getTransaction()
          Get corresponding transaction.
 int getType()
          Get transactional event type.
 

Field Detail

TYPE_BEFORE_COMPLETION

public static final int TYPE_BEFORE_COMPLETION
Before-completion event.

See Also:
Constant Field Values

TYPE_COMMIT

public static final int TYPE_COMMIT
Commit event.

See Also:
Constant Field Values

TYPE_ABORT

public static final int TYPE_ABORT
Abort event.

See Also:
Constant Field Values

TYPE_AFTER_COMPLETION

public static final int TYPE_AFTER_COMPLETION
After-completion event.

See Also:
Constant Field Values

TYPE_BEFORE_COMMIT

public static final int TYPE_BEFORE_COMMIT
Before-commit event.

See Also:
Constant Field Values

TYPE_AFTER_COMMIT

public static final int TYPE_AFTER_COMMIT
After-commt event.

See Also:
Constant Field Values

TYPE_BEFORE_ABORT

public static final int TYPE_BEFORE_ABORT
Before-abort event.

See Also:
Constant Field Values

TYPE_AFTER_ABORT

public static final int TYPE_AFTER_ABORT
After-abort event.

See Also:
Constant Field Values
Method Detail

getTransaction

public BasicTransaction getTransaction()
Get corresponding transaction. A transaction is the event source of TransactionalEvent.

Returns:
transaction that is the source of this transactional event

getType

public int getType()
Get transactional event type. The value is one of the constants defined in TransactionalEvent.

Returns:
type of this event