Message-driven bean bindings

No specific client sends messages to rule execution message-driven rule beans (MDB). JMS-managed objects require specific bindings.

The following component binding is required if you do not repackage the jrules-res-mdb-<appserver>.jar.

Note:

Make both connection factories XA-enabled.

Table 1. Bindings for Java Message Service (JMS) administered objects
JMS object Component binding
javax.jms.QueueConnectionFactory Any available queue connection factory, preferably XA:jms/BRESQueueConnectionFactory
javax.jms.Queue jms/BRESQueueIn
javax.jms.Topic jms/BRESTopic
javax.jms.TopicConnectionFactory Any available topic connection factory, preferably XA:jms/BRESTopicConnection

Add the following code to the standard deployment descriptor of the component that sends messages to the rule execution MDBs:

<resource-env-ref>
   <resource-env-ref-name>jms/BRESQueueIn</resource-env-ref-name>
   <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>

<resource-env-ref>
   <resource-env-ref-name>jms/BRESTopic</resource-env-ref-name>
   <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
</resource-env-ref>

<resource-ref>
   <res-ref-name>jms/BRESQueueConnectionFactory</res-ref-name>
   <res-type>javax.jms.QueueConnectionFactory</res-type>
   <res-auth>Container</res-auth>
   <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

<resource-ref>
   <res-ref-name>jms/BRESTopicConnectionFactory</res-ref-name>
   <res-type>javax.jms.TopicConnectionFactory</res-type>
   <res-auth>Container</res-auth>
   <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

This code binds the reference name to the real JNDI name of the Java™ Management Service Administered objects in your environment. This operation is normally performed at deployment time with tools, scripts, or specific deployment descriptors.

Note:

All of these JMS bindings are required even if you use queues and no topics, or topics and no queues.