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.jboss.mq.pm
Class TxManager

    java.lang.Object
      org.jboss.mq.pm.TxManager

public class TxManager
extends Object

This class allows provides the base for user supplied persistence packages.

Version:
  $Revision: 1.6 $
Author:
  Hiram Chirino (Cojonudo14@hotmail.com), Paul Kendall (paul.kendall@orion.co.nz), Adrian Brock

Constructor Summary
`TxManager(PersistenceManager pm)` Create a new TxManager

Method Summary
`void` | `addPostCommitTask(Tx txId, Runnable task)` Add an operation for after a commit
`void` | `addPostRollbackTask(Tx txId, Runnable task)` Add an operation for after a rollback
`void` | `commitTx(Tx txId)` Commit the transaction to the persistent store.
`Tx` | `createTx()` Create and return a unique transaction id.
`Tx` | `createTx(ConnectionToken dc, Object xid)` Create and return a unique transaction id.
`Tx` | `getPrepared(ConnectionToken dc, Object xid)` Return the local transaction id for a distributed transaction id.
`void` | `rollbackTx(Tx txId)` Rollback the transaction.

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

Constructor Detail

### TxManager

    public TxManager(PersistenceManager pm)

  Create a new TxManager

Parameters:
  `pm` - the persistence manager

Method Detail

### getPrepared

    public final Tx getPrepared(ConnectionToken dc,
                                Object xid)
                         throws javax.jms.JMSException

  Return the local transaction id for a distributed transaction id.

  Parameters:
    `dc` - the connection
    `xid` - the transaction id
  Returns:
    The Prepared transaction
  Throws:
    `javax.jms.JMSException` - Description of Exception

### createTx

    public final Tx createTx()
                      throws javax.jms.JMSException

  Create and return a unique transaction id.

  Returns:
    the transaction id
  Throws:
    `javax.jms.JMSException` - for any error

### commitTx

    public final void commitTx(Tx txId)
                        throws javax.jms.JMSException

  Commit the transaction to the persistent store.

  Parameters:
    `txId` - the transaction
  Throws:
    `javax.jms.JMSException` - for any error

### addPostCommitTask

    public void addPostCommitTask(Tx txId,
                                  Runnable task)
                           throws javax.jms.JMSException

  Add an operation for after a commit

  Parameters:
    `txId` - the transaction
    `task` - the task
  Throws:
    `javax.jms.JMSException` - for any error

### rollbackTx

    public void rollbackTx(Tx txId)
                    throws javax.jms.JMSException

  Rollback the transaction.

  Parameters:
    `txId` - the transaction
  Throws:
    `javax.jms.JMSException` - for any error

### addPostRollbackTask

    public void addPostRollbackTask(Tx txId,
                                    Runnable task)
                             throws javax.jms.JMSException

  Add an operation for after a rollback

  Parameters:
    `txId` - the transaction
    `task` - the task
  Throws:
    `javax.jms.JMSException` - for any error

### createTx

    public Tx createTx(ConnectionToken dc,
                       Object xid)
                throws javax.jms.JMSException

  Create and return a unique transaction id. Given a distributed connection and a transaction id object, allocate a unique local transaction id if the remote id is not already known.

  Parameters:
    `dc` - the connection token
    `xid` - the xid
  Returns:
    the transaction
  Throws:
    `javax.jms.JMSException` - for any error

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 © 2002 JBoss Group, LLC. All Rights Reserved.