Class ActiveJmsConnectionErrorHandler

  • All Implemented Interfaces:
    ComponentLifecycle, ConnectionErrorHandler

    public class ActiveJmsConnectionErrorHandler
    extends JmsConnectionErrorHandlerImpl
    ConnectionErrorHandler implementation that actively attempts messages via JMS to detect outages.

    Implementation of ConnectionErrorHandler which tests the connection every getCheckInterval() interval (default is 5 second) and if the test fails then restarts the Connection's owner and stops the testing thread.

    In the adapter configuration file this class is aliased as active-jms-connection-error-handler which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • ActiveJmsConnectionErrorHandler

        public ActiveJmsConnectionErrorHandler()
    • Method Detail

      • start

        public void start()
                   throws CoreException
        Description copied from interface: ComponentLifecycle
        Starts the component.

        Once a component is started it should be ready to process messages. In the case of AdaptrisMessageConsumer, calling start will begin message delivery.

        Throws:
        CoreException - wrapping any underlying Exceptions
      • stop

        public void stop()
        Description copied from interface: ComponentLifecycle
        Stop the component

        A stopped component is not expected to be ready to process messages. In the case of AdaptrisMessageConsumer, calling stop will pause message delivery. Throwing a RuntimeException may cause unintended consequences

      • close

        public void close()
        Description copied from interface: ComponentLifecycle
        Closes the component.

        A closed component should release any connections it uses, etc. and clean up completely. Throwing a RuntimeException may cause unintended consequences

      • getAdditionalLogging

        public java.lang.Boolean getAdditionalLogging()
      • setAdditionalLogging

        public void setAdditionalLogging​(java.lang.Boolean b)
        Whether or not to log each attempt at verifying the connection.
        Parameters:
        b - true to enable trace logging of every attempt to verify the connection status, default is null (false)
      • additionalLogging

        public boolean additionalLogging()
      • retryInterval

        public long retryInterval()
      • setCheckInterval

        public void setCheckInterval​(TimeInterval checkInterval)
        Set interval between each attempt to veri
        Parameters:
        checkInterval - the retry interval, if <=0 then the default is assumed (5 seconds).