Class WildFlyRecoveryDiscovery

java.lang.Object
org.jboss.activemq.artemis.wildfly.integration.recovery.WildFlyRecoveryDiscovery
All Implemented Interfaces:
SessionFailureListener, FailureListener

public class WildFlyRecoveryDiscovery extends Object implements SessionFailureListener

This class will have a simple Connection Factory and will listen for topology updates.

This Discovery is instantiated by WildFlyActiveMQRecoveryRegistry

Author:
clebertsuconic
  • Constructor Details

    • WildFlyRecoveryDiscovery

      public WildFlyRecoveryDiscovery(XARecoveryConfig config)
  • Method Details

    • start

      public void start(boolean retry)
    • stop

      public void stop()
    • incrementUsage

      public int incrementUsage()
      we may have several connection factories referencing the same connection recovery entry. Because of that we need to make a count of the number of the instances that are referencing it, so we will remove it as soon as we are done
    • decrementUsage

      public int decrementUsage()
    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • internalStop

      protected void internalStop()
    • connectionFailed

      public void connectionFailed(ActiveMQException exception, boolean failedOver)
      Description copied from interface: FailureListener
      Notifies that a connection has failed due to the specified exception.
      Specified by:
      connectionFailed in interface FailureListener
      Parameters:
      exception - exception which has caused the connection to fail
    • connectionFailed

      public void connectionFailed(ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID)
      Description copied from interface: FailureListener
      Notifies that a connection has failed due to the specified exception.
      Specified by:
      connectionFailed in interface FailureListener
      Parameters:
      me - exception which has caused the connection to fail
      scaleDownTargetNodeID - the ID of the node to which messages are scaling down
    • beforeReconnect

      public void beforeReconnect(ActiveMQException exception)
      Description copied from interface: SessionFailureListener
      Notifies that a connection has failed due to the specified exception.

      This method is called before the session attempts to reconnect/failover.

      Specified by:
      beforeReconnect in interface SessionFailureListener
      Parameters:
      exception - exception which has caused the connection to fail
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object