Show TOC Start of Content Area

Function documentation Message Endpoint Activation  Locate the document in its SAP Library structure

Use

A message endpoint is where the resource adapter sends the in-flowing messages. A message listener is registered to an endpoint to react upon a message receipt.

A message endpoint is typically a message-driven bean application which is deployed on the SAP AS Java. The MDB should also implement the appropriate message listener type, specified in the resource adapter deployment descriptor – ra.xml.

Features

When a message endpoint is activated on the SAP AS Java – for example, an MDB is deployed, the application server invokes the endpointActivation() method of the resource adapter. For the adapter this signifies that it can send messages to this endpoint.

The server passes a MessageEndpointFactory instance and a configured ActivationSpec instance to the resource adapter. Thus, the adapter can obtain a message endpoint instance by invoking the createEndpoint() method of the MessageEndpointFactory.

The resource adapter contains a separate ActivationSpec JavaBean for each supported message listener type. The ActivationSpec JavaBean is configured with the activation configuration properties from the deployment descriptor of the MDB. The MDB provides all properties necessary for activation specified in ra.xml. If the MDB does not provide all properties listed in ra.xml, an exception is thrown.

Additionally to acting as a message endpoint, the MDB is also a message listener for the relevant message provider. If the message endpoint is activated, the resource adapter can start processing incoming messages and dispatch them to the MDB.

Activities

As a resource adapter vendor, you are responsible for providing:

      Implementation of the endpointActivation() and endpointDeactivation() methods in the resource adapter JavaBean

      A message listener interface

      A JavaBean that implements the javax.resource.spi.ActivationSpec interface for each supported message listener type

      A declaration of the supported message listener types in the deployment descriptor of the resource adapter

If you develop an MDB to serve as a message endpoint to an inbound resource adapter, make sure that you:

      Implement the message listener interface provided by the resource adapter

      Add the activation configuration properties in the deployment descriptor of the bean. You must add at least the property required for the given message listener configured in ra.xml.

End of Content Area