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
Interface TransactionalResource

All Known Implementing Classes:
  AbstractTransactionalResource

public interface TransactionalResource

Interface for something that makes up a transactional resource.

Method Summary
`void` | `begin()`
`void` | `commit()` Commits the changes done inside this transaction reasource.
`int` | `getStatus()` Returns the current status of this transaction resource.
`Xid` | `getXid()` Returns the Xid this transctional resource is associated with.
`int` | `prepare()` Prepares the changes done inside this transaction reasource.
`void` | `resume()`
`void` | `rollback()` Rolls back the changes done inside this transaction reasource.
`void` | `setStatus(int status)` Sets the status of this transctional resource.
`void` | `suspend()`

Method Detail

### commit

    public void commit()
                throws XAException

  Commits the changes done inside this transaction reasource. This can mean to call commit on a connection associated to the resource or any other action that needs to be taken to make changes in this resource permanent.

  Throws:
    `XAException` - when anything goes wrong the error must be described in XA notation

### prepare

    public int prepare()
                throws XAException

  Prepares the changes done inside this transaction reasource. Same semantics as `XAResource.prepare(Xid)`.

  Throws:
    `XAException` - when anything goes wrong the error must be described in XA notation

### rollback

    public void rollback()
                  throws XAException

  Rolls back the changes done inside this transaction reasource. This can mean to call roll back on a connection associated to the resource or any other action that needs to be taken to undo the changes in this resource permanent.

  Throws:
    `XAException` - when anything goes wrong the error must be described in XA notation

### begin

    public void begin()
               throws XAException

  Throws:
    `XAException`

### suspend

    public void suspend()
                 throws XAException

  Throws:
    `XAException`

### resume

    public void resume()
                throws XAException

  Throws:
    `XAException`

### getStatus

    public int getStatus()

  Returns the current status of this transaction resource.

  Returns:
    the current status of this resource as defined by `Status`.

### setStatus

    public void setStatus(int status)

  Sets the status of this transctional resource. The status set by this method must be available over `getStatus()` afterwards.

  Parameters:
    `status` - the status to be set

### getXid

    public Xid getXid()

  Returns the Xid this transctional resource is associated with. This might have been set in the constructor of implementing classes.

  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.