org.hornetq.jms.server.recovery
Class HornetQRecoveryRegistry

java.lang.Object
  extended by org.hornetq.jms.server.recovery.HornetQRecoveryRegistry
All Implemented Interfaces:
org.jboss.tm.XAResourceRecovery

public class HornetQRecoveryRegistry
extends Object
implements org.jboss.tm.XAResourceRecovery

This class is used by the Resource Adapter to register RecoveryDiscovery, which is based on the XARecoveryConfig

Each outbound or inboud connection will pass the configuration here through by calling the method register(XARecoveryConfig)

Later the RecoveryDiscovery will call nodeUp(String, Pair, String, String) so we will keep a track of nodes on the cluster or nodes where this server is connected to.

Author:
clebertsuconic

Method Summary
 void failedDiscovery(RecoveryDiscovery failedDiscovery)
          in case of a failure the Discovery will register itslef to retry
static HornetQRecoveryRegistry getInstance()
           
 XAResource[] getXAResources()
          This will be called periodically by the Transaction Manager
 void nodeDown(String nodeID)
           
 void nodeUp(String nodeID, Pair<TransportConfiguration,TransportConfiguration> networkConfiguration, String username, String password)
           
 void register(XARecoveryConfig resourceConfig)
          This will be called by then resource adapters, to register a new discovery
 void unRegister(XARecoveryConfig resourceConfig)
          Reference counts and deactivate a configuration Notice: this won't remove the servers since a server may have previous XIDs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getXAResources

public XAResource[] getXAResources()
This will be called periodically by the Transaction Manager

Specified by:
getXAResources in interface org.jboss.tm.XAResourceRecovery

getInstance

public static HornetQRecoveryRegistry getInstance()

register

public void register(XARecoveryConfig resourceConfig)
This will be called by then resource adapters, to register a new discovery

Parameters:
resourceConfig -

unRegister

public void unRegister(XARecoveryConfig resourceConfig)
Reference counts and deactivate a configuration Notice: this won't remove the servers since a server may have previous XIDs

Parameters:
resourceConfig -

failedDiscovery

public void failedDiscovery(RecoveryDiscovery failedDiscovery)
in case of a failure the Discovery will register itslef to retry

Parameters:
failedDiscovery -

nodeUp

public void nodeUp(String nodeID,
                   Pair<TransportConfiguration,TransportConfiguration> networkConfiguration,
                   String username,
                   String password)
Parameters:
nodeID -
pair -
username -
password -

nodeDown

public void nodeDown(String nodeID)


Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.