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

## org.apache.commons.transaction.util.xa
Class AbstractTransactionalResource

    java.lang.Object
      org.apache.commons.transaction.util.xa.AbstractTransactionalResource

All Implemented Interfaces:
  Status, TransactionalResource

Direct Known Subclasses:
  MapXAResource.MapTransactionalResource

public abstract class AbstractTransactionalResource
extends Object
implements TransactionalResource, Status

Rudimentary abstract implementation of `TransactionalResource` for specific implementations to base upon.

Field Summary
`protected int` | `status`
`protected Xid` | `xid`

Fields inherited from interface javax.transaction.Status
`STATUS_ACTIVE, STATUS_COMMITTED, STATUS_COMMITTING, STATUS_MARKED_ROLLBACK, STATUS_NO_TRANSACTION, STATUS_PREPARED, STATUS_PREPARING, STATUS_ROLLEDBACK, STATUS_ROLLING_BACK, STATUS_UNKNOWN`

Constructor Summary
`AbstractTransactionalResource(Xid xid)`

Method Summary
`int` | `getStatus()` Returns the current status of this transaction resource.
`Xid` | `getXid()` Returns the Xid this transctional resource is associated with.
`void` | `setStatus(int status)` Sets the status of this transctional resource.

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

Methods inherited from interface org.apache.commons.transaction.util.xa.TransactionalResource
`begin, commit, prepare, resume, rollback, suspend`

Field Detail

### xid

    protected Xid xid

### status

    protected int status

Constructor Detail

### AbstractTransactionalResource

    public AbstractTransactionalResource(Xid xid)

Method Detail

### getStatus

    public int getStatus()

  Description copied from interface: `TransactionalResource`
  Returns the current status of this transaction resource.

  Specified by:
    `getStatus` in interface `TransactionalResource`
  Returns:
    the current status of this resource as defined by `Status`.

### setStatus

    public void setStatus(int status)

  Description copied from interface: `TransactionalResource`
  Sets the status of this transctional resource. The status set by this method must be available over `TransactionalResource.getStatus()` afterwards.

  Specified by:
    `setStatus` in interface `TransactionalResource`
  Parameters:
    `status` - the status to be set

### getXid

    public Xid getXid()

  Description copied from interface: `TransactionalResource`
  Returns the Xid this transctional resource is associated with. This might have been set in the constructor of implementing classes.

  Specified by:
    `getXid` in interface `TransactionalResource`
  Returns:
    the xid this transctional resource is associated with

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

Copyright © 2004 The Apache Software Foundation. All Rights Reserved.