J2C activation specification configuration options and precedence

 

Resource adapter scoped configuration

A J2C activation specification configuration instance can be created and modified under an installed resource adapter at the cell, node, or server scope. This activation specification configuration is created based on a particular message listener type for the given resource adapter. Valid properties available for configuration are determined by introspection of the ActivationSpec class instance provided with the resource adapter. When created, an ActivationSpec class instance is referenced by its JNDI name. This activation specification configuration is needed during the deployment of a message-driven bean for the resource adapter.

Configuring a J2C activation specification instance at the cell, node, or server level offers two distinct advantages:

  • The activation specification configuration information can be share among multiple message-driven beans across multiple applications.

  • Updates to the configuration properties can be made without the need to redeploy the application.

 

Application-based configuration

Applications with message-driven beans have the option of specifying all, some, or none of the properties needed by the ActivationSpec class. These properties, specified as activation-config properties in the application’s deployment descriptor, are configured when the application is assembled. To change any of these properties requires redeploying the application. These properties are unique to this applications use and are not shared with other message-driven beans. Any properties defined in the application's deployment descriptor take precedence over those defined by the resource adapter-scoped definition. This allows application developers to choose the best defaults for their applications.

To deploy and activate a message-driven bean with respect to application specification configuration properties would be as follows:

  1. Use JNDI to look up a J2C activation specification configuration instance, which is based on its resource adapter-scoped definition.

  2. Set the properties needed by the ActivationSpec class to the values defined by the cell, node, or server definition. If any of the properties are also defined as activation-config properties of the application, use the value defined by the activation-config property.

  3. During application startup, the server activates the MDB endpoint by calling the resource adapter and passing a configured instance of the ActivationSpec.

  4. Note that a resource adapter can specify in its deployment descriptor if a given ActivationSpec property is required. If it is required, and it is not supplied either by the cell, node or server definition, or an activation-config property from the applications deployment descriptor, then an exception is raised as part of the sequence to activate the message-driven bean.


 

See Also


J2C activation specification configuration and use

 

See Also


WebSphere activation specification optional binding properties