Message-driven beans - JCA components

There are several administrative components that you configure for message-driven beans as listeners on a Java™ EE Connector Architecture (JCA) 1.5 resource adapter.

Components for a JCA resource adapter

When a resource adapter is installed, it provides definitions and classes for administered objects such as activation specifications. The administrator creates and configures activation specifications with Java Naming and Directory Interface (JNDI) names that are then available for applications to use.

The JCA resource adapter uses an activation specification to configure a particular endpoint. Each application that configures one or more endpoints must specify the resource adapter that sends messages to the endpoint. The application uses the activation specification to provide configuration properties for the processing of inbound messages.

JMS components used with a JCA messaging provider

Message-driven beans that implement the javax.jms.MessageListener interface can be used with JMS messaging.

An application that uses JMS messaging needs access at runtime to configured objects such as connection factories and destinations:
  • When the JMS provider is the default JMS provider or the WebSphere® MQ messaging provider, the administrator configures these objects for the JMS provider. For example, to configure a JMS activation specification for the WebSphere MQ messaging provider, in the WebSphere Application Server administrative console navigate to Resources > JMS->Activation specifications.
  • Otherwise the administrator configures these objects for the JMS resource adapter, which connects the application to a JMS provider, by navigating to Resources > Resource Adapters.

If the application contains one or more message-driven beans, the administrator must configure either a JMS activation specification or a message listener port. For JCA-compliant messaging providers, the administrator usually configures an activation specification. But for the WebSphere MQ messaging provider there is a choice; the administrator can configure an activation specification or, for compatibility with previous versions of WebSphere Application Server, the administrator can configure a message listener port.

The JMS activation specification provides the deployer with information about the configuration properties of a message-driven bean related to the processing of the inbound messages. For example, a JMS activation specification specifies the name of the service integration bus to connect to, information about the message acknowledgement modes, message selectors, destination types, and whether durable subscriptions are shared across connections with members of a server cluster.

The activation specification identifies a JMS destination by specifying its JNDI name. The message-driven bean acts as a listener on a specific JMS destination.

The JMS destination refers to a service integration bus destination (or WebSphere MQ destination) that the administrator must also configure. For more information about JMS resources and service integration, see Default messaging.