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 WildFlyActiveMQRecoveryRegistry#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.
Modifier and Type | Method and Description |
---|---|
void |
failedDiscovery(WildFlyRecoveryDiscovery failedDiscovery)
in case of a failure the Discovery will register itslef to retry
|
static WildFlyActiveMQRecoveryRegistry |
getInstance() |
XAResource[] |
getXAResources()
This will be called periodically by the Transaction Manager
|
void |
nodeDown(String nodeID) |
void |
nodeUp(org.apache.activemq.artemis.service.extensions.xa.recovery.XARecoveryConfig listeningConfig,
String nodeID,
org.apache.activemq.artemis.api.core.Pair<org.apache.activemq.artemis.api.core.TransportConfiguration,org.apache.activemq.artemis.api.core.TransportConfiguration> networkConfiguration,
String username,
String password,
Map<String,String> properties) |
void |
register(org.apache.activemq.artemis.service.extensions.xa.recovery.XARecoveryConfig resourceConfig)
This will be called by then resource adapters, to register a new discovery
|
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.
|
void |
unRegister(org.apache.activemq.artemis.service.extensions.xa.recovery.XARecoveryConfig resourceConfig)
Reference counts and deactivate a configuration
Notice: this won't remove the servers since a server may have previous XIDs
|
public XAResource[] getXAResources()
getXAResources
in interface org.jboss.tm.XAResourceRecovery
public static WildFlyActiveMQRecoveryRegistry getInstance()
public void register(org.apache.activemq.artemis.service.extensions.xa.recovery.XARecoveryConfig resourceConfig)
resourceConfig
- public void unRegister(org.apache.activemq.artemis.service.extensions.xa.recovery.XARecoveryConfig resourceConfig)
resourceConfig
- public void stop()
public void failedDiscovery(WildFlyRecoveryDiscovery failedDiscovery)
failedDiscovery
- public void nodeUp(org.apache.activemq.artemis.service.extensions.xa.recovery.XARecoveryConfig listeningConfig, String nodeID, org.apache.activemq.artemis.api.core.Pair<org.apache.activemq.artemis.api.core.TransportConfiguration,org.apache.activemq.artemis.api.core.TransportConfiguration> networkConfiguration, String username, String password, Map<String,String> properties)
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 configurationpublic void nodeDown(String nodeID)
Copyright © 2019 JBoss by Red Hat. All rights reserved.