+

Search Tips   |   Advanced Search

Manage messages with message endpoints

Manage message delivery for message-driven beans (MDB) deployed as message endpoints. The message endpoints are managed beans (MBeans) for inbound resource adapters that are compliant with Java EE Connector Architecture (JCA) Version 1.5.

The application server provides message endpoint MBeans to assist us in managing the delivery of a message to the message-driven beans that are acting as listeners on specific endpoints, which are destinations, and in managing the enterprise information system (EIS) resources that are utilized by these message-driven beans. Message-driven beans deployed as message endpoints are not the same as message-driven beans configured against a listener port. Message-driven beans used as message endpoints must be deployed using an ActivationSpecification that is defined within a resource adapter configuration for JCA Version 1.5.

With message endpoint MBeans, we can activate and deactivate specific endpoints within the applications to ensure that messages are delivered only to listening message-driven beans interacting with healthy EIS resources. This capability allows us to optimize the performance of our JMS applications in situations where an EIS resource is not behaving as expected. Message delivery to an endpoint typically fails when the message driven bean that is listening invokes an operation against a resource that is not healthy. For example, a messaging provider, which is an inbound resource adapter that is JCA Version 1.5 compliant, might fail to deliver messages to an endpoint when its underlying message-driven bean attempts to commit transactions against a database server that is not responding.

Design the message-driven beans to delegate business processing to other enterprise beans. Do not access the EIS resources directly in the message-driven bean, but do so indirectly through a delegate bean.

Message endpoint MBeans alleviate two problems inherent to applications that provide message endpoints that access resources:

The capability to deactivate (pause) and reactivate (resume) a specific message endpoint alleviates these problems by enabling the administrator to deactivate the endpoint from processing messages that are destined to fail. When the message endpoint is deactivated, we can repair the resource that is causing the problems and reactivate the endpoint to resume handling message requests. In the course of troubleshooting, we will not affect the resource adapter or the application hosting the endpoint.

If we are connecting to IBM MQ, we can also use the WAS_EndpointInitialState custom property in the activation specification to make the message endpoint start out in a deactivated state. When we set this property to Inactive, the message-driven bean connects with the destination, but does not start receiving messages. Use this setting to automatically deactivate a message endpoint when you know that certain tasks must be completed, services must be started, or checks must be carried out, before message handling begins. You activate the message endpoint in the same way as we would reactivate a message endpoint that you paused during its operation.


Tasks

  1. Use the administrative console, navigate to the Message Endpoints panel for the application hosting the message endpoint.

    1. Select...

      The panel lists the set of message endpoints that are hosted by the application.

  2. Optional: Temporarily disable a message endpoint from handling messages and troubleshoot the problem.

    1. Deactivate the message endpoint by selecting the appropriate endpoint and clicking Pause.
    2. When the message endpoint is inactive, diagnose and repair the underlying cause of the delivery failures.
    3. Reactivate the message endpoint by selecting the appropriate endpoint and clicking Resume.

  3. Optional: Activate a message endpoint that started out in a deactivated state. Select the appropriate endpoint and click Resume.

The behavior we will observe when you deactivate (pause) a message endpoint using the message endpoint MBean is dependent upon a variety of factors, including the resource adapter that manages the message endpoint, the configuration of the message endpoint and the application server topology. Some specific examples of interest are as follows:


Subtopics


  • Manage the message endpoint lifecycle
  • IBM MQ messaging provider activation specification settings