org.activemq.service
Class TransactionManager

java.lang.Object
  extended by org.activemq.service.TransactionManager
All Implemented Interfaces:
Service
Direct Known Subclasses:
TransactionManagerImpl

public abstract class TransactionManager
extends Object
implements Service

A Transaction keeps track of all the tasks that must be run before and after transactional events.

Version:
$Revision: 1.1.1.1 $

Constructor Summary
TransactionManager()
           
 
Method Summary
abstract  void cleanUpClient(BrokerClient client)
          A hint to the TransactionManager that an BrokerClient has stopped This enables the TransactionManager to rollback in progess transactions that the client created.
abstract  Transaction createLocalTransaction(BrokerClient client, String txid)
           
abstract  Transaction createXATransaction(BrokerClient client, ActiveMQXid xid)
           
static Transaction getContexTransaction()
           
abstract  Transaction getLocalTransaction(String txid)
           
abstract  ActiveMQXid[] getPreparedXATransactions()
           
abstract  Transaction getXATransaction(ActiveMQXid xid)
           
static boolean isCurrentTransaction()
           
abstract  void recover(Transaction transaction)
          Called on restart when recovering prepared transactions to reload a transaction from persistent store
static void setContexTransaction(Transaction tx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.activemq.service.Service
start, stop
 

Constructor Detail

TransactionManager

public TransactionManager()
Method Detail

setContexTransaction

public static void setContexTransaction(Transaction tx)

getContexTransaction

public static Transaction getContexTransaction()

isCurrentTransaction

public static boolean isCurrentTransaction()
Returns:
true if there is a current transaction

createLocalTransaction

public abstract Transaction createLocalTransaction(BrokerClient client,
                                                   String txid)
                                            throws JMSException
Throws:
JMSException

getLocalTransaction

public abstract Transaction getLocalTransaction(String txid)
                                         throws JMSException
Throws:
JMSException

createXATransaction

public abstract Transaction createXATransaction(BrokerClient client,
                                                ActiveMQXid xid)
                                         throws XAException
Throws:
XAException

getXATransaction

public abstract Transaction getXATransaction(ActiveMQXid xid)
                                      throws XAException
Throws:
XAException

getPreparedXATransactions

public abstract ActiveMQXid[] getPreparedXATransactions()
                                                 throws XAException
Throws:
XAException

cleanUpClient

public abstract void cleanUpClient(BrokerClient client)
                            throws JMSException
A hint to the TransactionManager that an BrokerClient has stopped This enables the TransactionManager to rollback in progess transactions that the client created.

Parameters:
client -
Throws:
JMSException

recover

public abstract void recover(Transaction transaction)
Called on restart when recovering prepared transactions to reload a transaction from persistent store



Copyright © 2004-2008 Protique, Ltd.. All Rights Reserved.