Class JmsActivation

    • Field Detail

      • ONMESSAGE

        public static final Method ONMESSAGE
        The onMessage method
      • endpointFactory

        protected javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory
        The message endpoint factory
      • deliveryActive

        protected AtomicBoolean deliveryActive
        Whether delivery is active
      • destination

        protected javax.jms.Destination destination
        The destination
      • isTopic

        protected boolean isTopic
        The destination type
      • connection

        protected javax.jms.Connection connection
        The connection
      • isDeliveryTransacted

        protected boolean isDeliveryTransacted
        Is the delivery transacted
    • Constructor Detail

      • JmsActivation

        public JmsActivation​(JmsResourceAdapter ra,
                             javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                             JmsActivationSpec spec)
                      throws javax.resource.ResourceException
        Throws:
        javax.resource.ResourceException
    • Method Detail

      • getActivationSpec

        public JmsActivationSpec getActivationSpec()
        Returns:
        the activation spec
      • getMessageEndpointFactory

        public javax.resource.spi.endpoint.MessageEndpointFactory getMessageEndpointFactory()
        Returns:
        the message endpoint factory
      • isDeliveryTransacted

        public boolean isDeliveryTransacted()
        Returns:
        whether delivery is transacted
      • getWorkManager

        public javax.resource.spi.work.WorkManager getWorkManager()
        Returns:
        the work manager
      • getConnection

        public javax.jms.Connection getConnection()
        Returns:
        the connection
      • getDestination

        public javax.jms.Destination getDestination()
        Returns:
        the destination
      • isTopic

        public boolean isTopic()
        Returns:
        the destination type
      • start

        public void start()
                   throws javax.resource.ResourceException
        Start the activation
        Throws:
        javax.resource.ResourceException - for any error
      • stop

        public void stop()
        Stop the activation
      • handleFailure

        public void handleFailure​(Throwable failure)
        Handles any failure by trying to reconnect
        Parameters:
        failure - the reason for the failure
      • onException

        public void onException​(javax.jms.JMSException exception)
        Specified by:
        onException in interface javax.jms.ExceptionListener
      • teardown

        protected void teardown()
        Teardown the activation
      • setupDestination

        protected void setupDestination​(Context ctx)
                                 throws Exception
        Setup the Destination
        Parameters:
        ctx - the naming context
        Throws:
        Exception - for any error
      • teardownDestination

        protected void teardownDestination()
        Teardown the destination
      • teardownConnection

        protected void teardownConnection()
        Teardown the connection
      • setupSessionPool

        protected void setupSessionPool()
                                 throws Exception
        Setup the server session pool
        Throws:
        Exception - for any error
      • teardownSessionPool

        protected void teardownSessionPool()
        Teardown the server session pool
      • defaultToString

        public static final String defaultToString​(Object object)