org.jboss.jms.tx
Class ResourceManager

java.lang.Object
  extended by org.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: 2924 $ $Id: ResourceManager.java 2924 2007-07-24 00:09:28Z clebert.suconic@jboss.com $
Author:
Tim Fox, Madhu Konda, Juha Lindfors, Hiram Chirino, Adrian Brock

Method Summary
 void addAck(java.lang.Object xid, java.lang.String sessionId, DeliveryInfo ackInfo)
          Add an acknowledgement to the transaction
 void addMessage(java.lang.Object xid, java.lang.String sessionId, JBossMessage m)
          Add a message to a transaction
 boolean checkForAcksInSession(java.lang.String sessionId)
           
 void commitLocal(LocalTx xid, ConnectionDelegate connection)
           
 LocalTx createLocalTx()
          Create a local tx.
 java.util.List getDeliveriesForSession(java.lang.String sessionID)
           
 int getServerID()
           
 ClientTransaction getTx(java.lang.Object xid)
           
 void handleFailover(int newServerID, java.lang.String oldSessionID, java.lang.String 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

getServerID

public int getServerID()

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,
                       java.lang.String 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,
                           java.lang.String oldSessionID,
                           java.lang.String newSessionID)

getDeliveriesForSession

public java.util.List getDeliveriesForSession(java.lang.String sessionID)

addAck

public void addAck(java.lang.Object xid,
                   java.lang.String 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(java.lang.String sessionId)


Copyright © 2006 JBoss Inc. All Rights Reserved.