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.mule.transaction
Class AbstractSingleResourceTransaction

    java.lang.Object
      org.mule.transaction.AbstractTransaction
          org.mule.transaction.AbstractSingleResourceTransaction

All Implemented Interfaces:
  Transaction

Direct Known Subclasses:
  JdbcTransaction, JmsClientAcknowledgeTransaction, JmsTransaction, SpringTransactionFactory.SpringTransaction, VMTransaction

    public abstract class AbstractSingleResourceTransaction

extends AbstractTransaction

This abstract class can be used as a base class for transactions that can enlist only one resource (such as a JMS session or JDBC connection).

Field Summary
`protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean` | `committed`
`protected Object` | `key`
`protected Object` | `resource`
`protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean` | `rollbackOnly`
`protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean` | `rolledBack`
`protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean` | `started`
`protected static Map<Integer,String>` | `txStatusMappings` TX status code to human-readable string mappings.

Fields inherited from class org.mule.transaction.AbstractTransaction
`id, logger, muleContext`

Fields inherited from interface org.mule.api.transaction.Transaction
`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
`protected` | `AbstractSingleResourceTransaction(MuleContext muleContext)`

Method Summary
`void` | `begin()` Begin the transaction.
`void` | `bindResource(Object key, Object resource)`
`void` | `commit()` Commit the transaction
`Object` | `getResource(Object key)`
`int` | `getStatus()`
`boolean` | `hasResource(Object key)`
`void` | `rollback()` Rollback the transaction
`void` | `setRollbackOnly()`
`String` | `toString()`

Methods inherited from class org.mule.transaction.AbstractTransaction
`doBegin, doCommit, doRollback, fireNotification, getId, isBegun, isCommitted, isRollbackOnly, isRolledBack, isXA, resume, suspend, unbindTransaction`

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

Field Detail

### txStatusMappings

    protected static Map<Integer,String> txStatusMappings

  TX status code to human-readable string mappings.

  See Also:
    `Status`

### key

    protected volatile Object key

### resource

    protected volatile Object resource

### started

    protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean started

### committed

    protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean committed

### rolledBack

    protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean rolledBack

### rollbackOnly

    protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean rollbackOnly

Constructor Detail

### AbstractSingleResourceTransaction

    protected AbstractSingleResourceTransaction(MuleContext muleContext)

Method Detail

### begin

    public void begin()
               throws TransactionException

  Description copied from interface: `Transaction`
  Begin the transaction.

  Specified by:
    `begin` in interface `Transaction`
  Overrides:
    `begin` in class `AbstractTransaction`
  Throws:
    `TransactionException`

### commit

    public void commit()
                throws TransactionException

  Description copied from interface: `Transaction`
  Commit the transaction

  Specified by:
    `commit` in interface `Transaction`
  Overrides:
    `commit` in class `AbstractTransaction`
  Throws:
    `TransactionException`

### rollback

    public void rollback()
                  throws TransactionException

  Description copied from interface: `Transaction`
  Rollback the transaction

  Specified by:
    `rollback` in interface `Transaction`
  Overrides:
    `rollback` in class `AbstractTransaction`
  Throws:
    `TransactionException`

### getStatus

    public int getStatus()
                  throws TransactionStatusException

  Throws:
    `TransactionStatusException`

### getResource

    public Object getResource(Object key)

### hasResource

    public boolean hasResource(Object key)

### bindResource

    public void bindResource(Object key,
                             Object resource)
                      throws TransactionException

  Throws:
    `TransactionException`

### setRollbackOnly

    public void setRollbackOnly()

### toString

    public String toString()

  Overrides:
    `toString` in class `AbstractTransaction`

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 © 2003-2010 MuleSoft, Inc.. All Rights Reserved.