Activation specifications are part of the configuration of inbound messaging support provided by a JCA 1.5 resource
adapter, such as Apache CXF JCA Connector. Resource adapters that support inbound messaging define one or more types of message
listener in their deployment descriptors. This is defined in the messagelistener element in the
ra.xml file. The message listener is the interface that the resource adapter uses to communicate inbound
messages to the message endpoint. For each type of message listener that a resource adapter implements, the resource adapter
defines an associated activation specification, which defines configuration properties for the receiving endpoint.
The Apache CXF JCA Connector inbound support includes two types of message listener and two activation specification classes, one for each message listener type.
Table 5.1. Message Listeners and Activation Specifications
| Message Listener Type | Activation Specification Class | Supported Properties |
|---|---|---|
|
Target service interface, used when MDB also implements the target service. See Service Implemented as a Message Driven Bean for an example use case. | org.apache.cxf.jca.inbound.MDBActivationSpec |
See Table 5.2. |
|
See Service Implemented as a Stateless Session Beanfor an example use case. | org.apache.cxf.jca.inbound.DispatchMDBActivationSpec | See Table 5.2 and Table 5.3. |
Table 5.2 shows the activation configuration properties that are
supported when the target service interface is specified as the message listener type and
org.apache.cxf.jca.inbound.MDBActivationSpec is specified as the activation specification class in the
Apache CXF JCA Connector ra.xml file.
Table 5.2. Service Implemented as MDB: Supported Activation Configuration Properties
Table 5.2 and
Table 5.3 show the activation configuration properties that are
supported when org.apache.cxf.jca.inbound.DispatchMDBMessageListener is specified as the message listener
type and org.apache.cxf.jca.inbound.DispatchMDBActivationSpec is specified as the activation specification class
in the Apache CXF JCA Connector ra.xml file.
Activation configuration properties can be set in any of the following:
The application deployment descriptor.
Activation specification, which can be set when deploying Apache CXF JCA Connector.
The Apache CXF JCA Connector deployment descriptor,
ra.xml.
Values specified in the ejb-jar.xml file override those set in the activation specification and the
ra.xml file. Values specified in the activation specification override those set in the
ra.xml file.
For an example of how the activation configuration properties are set, see:
The
ra.xmllocated in, the relevant sections of which are shown in Example 5.1.InstallDir/samples/integration/jca/inbound-mdb-dispatch/etcThe
ejb-jar.xmlfile located inInstallDir/samples/integration/jca/inbound-mdb-dispatch/etc, the relevant sections of which are shown in Example 5.2.
Example 5.1. Activation Specification in ra.xml
<messagelistener>
<messagelistener-type>
org.apache.cxf.jca.inbound.DispatchMDBMessageListener
</messagelistener-type>
<activationspec>
<activationspec-class>
org.apache.cxf.jca.inbound.DispatchMDBActivationSpec
</activationspec-class>
<required-config-property>
<config-property-name>displayName
</config-property-name>
</required-config-property>
<required-config-property>
<config-property-name>targetBeanJndiName
</config-property-name>
</required-config-property>
</activationspec>
</messagelistener>Example 5.2. Activation Specification in ejb-jar.xml
<activation-config>
<!-- display name-->
<activation-config-property>
<activation-config-property-name>
DisplayName
</activation-config-property-name>
<activation-config-property-value>
DispatchedGreeterEndpoint
</activation-config-property-value>
</activation-config-property>
<!-- service endpoint interface -->
<activation-config-property>
<activation-config-property-name>
serviceInterfaceClass
</activation-config-property-name>
<activation-config-property-value>
org.apache.hello_world_soap_http.Greeter
</activation-config-property-value>
</activation-config-property>
<!-- address -->
<activation-config-property>
<activation-config-property-name>
address
</activation-config-property-name>
<activation-config-property-value>
http://localhost:9999/GreeterBean
</activation-config-property-value>
</activation-config-property>
<!-- targetBeanJndiName -->
<activation-config-property>
<activation-config-property-name>
targetBeanJndiName
</activation-config-property-name>
<activation-config-property-value>
java:comp/env/DispatchedGreeterLocalHome
</activation-config-property-value>
</activation-config-property>
</activation-config>






