org.jboss.jms.tx
Class ResourceManager

java.lang.Object
  extended byorg.jboss.jms.tx.ResourceManager

public class ResourceManager
extends java.lang.Object

The ResourceManager manages work done in both local and global (XA) transactions. This is one instance of ResourceManager per JMS server. The ResourceManager instances are managed by ResourceManagerFactory.

Version:
$Revision: 2685 $ $Id: ResourceManager.java 2685 2007-05-15 07:56:12Z timfox $
Author:
Tim Fox, Madhu Konda, Juha Lindfors, Hiram Chirino, Adrian Brock

Method Summary
 void addAck(java.lang.Object xid, int sessionId, DeliveryInfo ackInfo)
          Add an acknowledgement to the transaction
 void addMessage(java.lang.Object xid, int sessionId, JBossMessage m)
          Add a message to a transaction
 boolean checkForAcksInSession(int sessionId)
           
 void commitLocal(LocalTx xid, ConnectionDelegate connection)
           
 LocalTx createLocalTx()
          Create a local tx.
 java.util.List getDeliveriesForSession(int sessionID)
           
 ClientTransaction getTx(java.lang.Object xid)
           
 void handleFailover(int newServerID, int oldSessionID, int newSessionID)
           
 void merge(ResourceManager other)
           
 ClientTransaction removeTx(java.lang.Object xid)
          Remove a tx
 void rollbackLocal(java.lang.Object xid)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

merge

public void merge(ResourceManager other)

removeTx

public ClientTransaction removeTx(java.lang.Object xid)
Remove a tx


createLocalTx

public LocalTx createLocalTx()
Create a local tx.


addMessage

public void addMessage(java.lang.Object xid,
                       int sessionId,
                       JBossMessage m)
Add a message to a transaction

Parameters:
xid - - The id of the transaction to add the message to
m - The message

handleFailover

public void handleFailover(int newServerID,
                           int oldSessionID,
                           int newSessionID)

getDeliveriesForSession

public java.util.List getDeliveriesForSession(int sessionID)

addAck

public void addAck(java.lang.Object xid,
                   int sessionId,
                   DeliveryInfo ackInfo)
            throws JMSException
Add an acknowledgement to the transaction

Parameters:
xid - - The id of the transaction to add the message to
ackInfo - Information describing the acknowledgement
Throws:
JMSException

commitLocal

public void commitLocal(LocalTx xid,
                        ConnectionDelegate connection)
                 throws JMSException
Throws:
JMSException

rollbackLocal

public void rollbackLocal(java.lang.Object xid)
                   throws JMSException
Throws:
JMSException

getTx

public ClientTransaction getTx(java.lang.Object xid)

size

public int size()

checkForAcksInSession

public boolean checkForAcksInSession(int sessionId)


Copyright © 2006 JBoss Inc. All Rights Reserved.