Class WildFlyActiveMQRecoveryRegistry
java.lang.Object
org.jboss.activemq.artemis.wildfly.integration.recovery.WildFlyActiveMQRecoveryRegistry
- All Implemented Interfaces:
org.jboss.tm.XAResourceRecovery
public class WildFlyActiveMQRecoveryRegistry
extends Object
implements org.jboss.tm.XAResourceRecovery
This class is used by the Resource Adapter to register RecoveryDiscovery, which is based on the
org.apache.activemq.wildfly.integration.recovery.XARecoveryConfig
Each outbound or inboud connection will pass the configuration here through by calling the method
register(org.apache.activemq.wildfly.integration.recovery.XARecoveryConfig)
Later the WildFlyRecoveryDiscovery will call
WildFlyActiveMQRecoveryRegistry#nodeUp(String, org.apache.activemq.api.core.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
Modifier and TypeMethodDescriptionvoidfailedDiscovery(WildFlyRecoveryDiscovery failedDiscovery) in case of a failure the Discovery will register itself to retryThis will be called periodically by the Transaction ManagervoidvoidnodeUp(XARecoveryConfig listeningConfig, String nodeID, TransportConfiguration[] networkConfiguration, String username, String password, Map<String, String> properties) voidregister(XARecoveryConfig resourceConfig) This will be called by then resource adapters, to register a new discoveryvoidstop()We need to make sure that all resources are closed, we don't actually do this when a resourceConfig is closed but maybe we should.toString()voidunRegister(XARecoveryConfig resourceConfig) Reference counts and deactivate a configuration Notice: this won't remove the servers since a server may have previous XIDs
-
Method Details
-
getXAResources
This will be called periodically by the Transaction Manager- Specified by:
getXAResourcesin interfaceorg.jboss.tm.XAResourceRecovery- Returns:
- the XAResources managed by this registry
-
getInstance
-
register
This will be called by then resource adapters, to register a new discovery- Parameters:
resourceConfig-
-
unRegister
Reference counts and deactivate a configuration Notice: this won't remove the servers since a server may have previous XIDs- Parameters:
resourceConfig-
-
stop
public void stop()We need to make sure that all resources are closed, we don't actually do this when a resourceConfig is closed but maybe we should. -
failedDiscovery
in case of a failure the Discovery will register itself to retry- Parameters:
failedDiscovery-
-
nodeUp
public void nodeUp(XARecoveryConfig listeningConfig, String nodeID, TransportConfiguration[] networkConfiguration, String username, String password, Map<String, String> properties) - Parameters:
listeningConfig- the connection factory where we are listening topology updates.nodeID- the node id coming from the topology updatenetworkConfiguration- the network configurationusername- the user namepassword- the passwordproperties- the properties passed to the configuration
-
nodeDown
-
toString
-