J2C activation specification configuration and use
Configure J2C activation specifications, and use them in the deployment of message-driven beans for JCA 1.5 or later, resources.
J2C activation specifications are part of the configuration of inbound messaging support that can be part of a JCA 1.5 or later, resource adapter. Each JCA 1.5 or later, resource adapter that supports inbound messaging defines one or more types of message listener in its deployment descriptor (messagelistener in the ra.xml). The message listener is the interface that the resource adapter uses to communicate inbound messages to the message endpoint. A message-driven bean (MDB) is a message endpoint and implements one of the message listeners interfaces provided by the resource adapter. By allowing multiple types of message listener, a resource adapter can support various different protocols. For example, the interface javax.jms.MessageListener, is a type of message listener that supports JMS messaging. For each type of message listener that a resource adapter implements, the resource adapter defines an associated activation specification (activationspec in the ra.xml). The activation specification is used to set configuration properties for a particular use of the inbound support for the receiving endpoint.
When an application containing a message-driven bean is deployed, the deployer must select a resource adapter that supports the same type of message listener that the message-driven bean implements. As part of the message-driven bean deployment, the deployer needs to specify the properties to set on the J2C activation specification. During application startup, a J2C activation specification instance is created, and these properties are set and used to activate the endpoint (to configure the resource adapter inbound support for the specific message-driven bean).
Applications with message-driven beans can also specify all, some, or none of the configuration properties needed by the ActivationSpec class, to override those properties that are defined by the resource adapter-scoped definition. These properties, which are specified as activation-config properties in the deployment descriptor for the application, are configured when the application is assembled. To change any of these properties requires redeploying the application. These properties are unique to the applications use and are not shared with other message-driven beans. Any properties defined in the application deployment descriptor take precedence over those properties defined by the resource adapter-scoped definition. This allows application developers to choose the best defaults for their applications.
J2C Activation Specifications collection J2C Activation Specifications settings