Class ActiveMQActivationService

java.lang.Object
org.wildfly.extension.messaging.activemq.ActiveMQActivationService
All Implemented Interfaces:
Service, Service<Void>, Value<Void>

public class ActiveMQActivationService extends Object implements Service<Void>
A service that can be dependent on to ensure the ActiveMQ server is active. ActiveMQ servers can be passive when they are configured as backup and wait for a live node to fail. In this passive state, the server does not accept connections or create resources. This service must be used by any service depending on an ActiveMQ server being active.
Author:
Jeff Mesnil (c) 2013 Red Hat inc.
  • Constructor Details

    • ActiveMQActivationService

      public ActiveMQActivationService()
  • Method Details

    • getServiceName

      public static ServiceName getServiceName(ServiceName serverName)
    • isActiveMQServerActive

      public static boolean isActiveMQServerActive(org.jboss.as.controller.OperationContext context, ModelNode operation)
    • isActiveMQServerActive

      public static boolean isActiveMQServerActive(ServiceRegistry serviceRegistry, ServiceName activeMQServerServiceName)
    • rollbackOperationIfServerNotActive

      public static boolean rollbackOperationIfServerNotActive(org.jboss.as.controller.OperationContext context, ModelNode operation)
    • ignoreOperationIfServerNotActive

      public static boolean ignoreOperationIfServerNotActive(org.jboss.as.controller.OperationContext context, ModelNode operation)
    • start

      public void start(StartContext context) throws StartException
      Description copied from interface: Service
      Start the service. Do not return until the service has been fully started, unless an asynchronous service start is performed. All injections will be complete before this method is called.

      If the service start involves any activities that may block, the asynchronous mechanism provided by the context should be used. See the class javadoc for details.

      Specified by:
      start in interface Service
      Parameters:
      context - the context which can be used to trigger an asynchronous service start
      Throws:
      StartException - if the service could not be started for some reason
    • stop

      public void stop(StopContext context)
      Description copied from interface: Service
      Stop the service. Do not return until the service has been fully stopped, unless an asynchronous service stop is performed. All injections will remain intact until the service is fully stopped. This method should not throw an exception.

      If the service start involves any activities that may block, the asynchronous mechanism provided by the context should be used. See the class javadoc for details.

      Specified by:
      stop in interface Service
      Parameters:
      context - the context which can be used to trigger an asynchronous service stop
    • getValue

      Description copied from interface: Value
      Get the actual dependency value.
      Specified by:
      getValue in interface Value<Void>
      Returns:
      the actual dependency value
      Throws:
      IllegalStateException - if the value is time-sensitive and the current state does not allow retrieval.
      IllegalArgumentException - when the value cannot be read due to misconfiguration