Chapter 13. Other Java Message Service Provider Configuration Options
13.1. Configure Java Message Service Listeners and Gateways
jboss-esb.xml configuration file:
Procedure 13.1. Task
Open the Configuration File
vi jboss-esb.xmlEdit the File
Specify the following parameters:- jndi-URL
- jndi-context-factory
- jndi-pkg-prefix
- connection-factory
- destination-type
- destination-name
Important
Make sure you include your JMS provider's client's JAR files in the class-path.Save
Save the file and exit the text editor.
13.2. JmsConnectionPool
13.3. Set the Maximum Number of Sessions Per Connection
Procedure 13.2. Task
Open the Relevant Configuration File
Open the component in question's JNDI configuration file in a text editor.Set the relevant Properties
You can edit these two properties: max-sessions-per-connection and max-xa-sessions-per-connectionYou must set the parameters as generic properties in the JMS provider configuration files. This example code demonstrates how to do so:<jms-provider ...> <property name="max-sessions-per-connection" value="5" /> <property name="max-xa-sessions-per-connection" value="1" /> <!-- And add providers.... --> </jms-provider>
Note
If you do not configure either of these parameters, then the JmsConnectionPool creates a single JMS connection and derives every session from it.
13.4. JNDI Configuration File Properties
Table 13.1. JNDI Configuration File Properties
| Property | Description |
|---|---|
| max-sessions-per-connection | This is the maximum total number of sessions allowed per connection (for both extended (XA) and non-XA session instances.) The default value is the same as the maximum number of JMS sessions allowed for the JmsConnectionPool as a whole, (which you can configure by changing the setting in the jbossesb-properties.xml file. The default is twenty.) |
| max-xa-sessions-per-connection | This is the maximum number of XA sessions allowed per connection. The default value is the same as that which has been set for max-sessions-per-connection. |
13.5. jms-jca-provider
13.6. Configure the jms-jca-provider
Procedure 13.3. Task
Edit the Configuration File
Open the configuration file in a text editor and modify the settings. Here is a sample:<jms-jca-provider connection-factory="XAConnectionFactory" name="JBossMessaging"> <jms-bus busid="ordersGwChannel"> <jms-message-filter dest-name="queue/orders" dest-type="QUEUE" transacted="true"/> </jms-bus> <activation-config> <property name="dLQMaxResent" value="5"/> </activation-config> </jms-jca-provider>
Save
Save the file and exit.
13.7. jms-jca-provider Configuration Options
- The JCA inflows (which are on the server side).You can configure these items for them:
- The JCA Adapter Name. This is configured as an attribute on the <jms-jca-provider>element.
- The JCA Provider Adapter JNDI. This is configured as an attribute on the <jms-jca-provider> element.
- The JCA Endpoint Class. This is configured as an attribute on the <jms-jca-provider> element.
- The transacted flag. This is configured as an attribute on the <jms-jca-provider> element.
- The message type. This is configured as an attribute on the <jms-jca-provider> element.
- The JCA bridge. This is configured as an attribute on the <jms-jca-provider> element.
- The JCA adapter activation configuration. This is configured in the <activation-config> element inside the <jms-jca-provider>.
Note
The JCA activation configuration also extracts some configuration properties for the JCA Inflow from the <jms-bus> and <jms-message-filter> that are nested inside the <jms-jca-provider> element. These include the destination type, destination name and message selector. - The JMS connection details (which are on the client side), used to deliver messages to the JMS JCA inflows (which are either gateways or ESB-aware listeners.)These settings are used to generate the end-point reference for clients connecting to the JMS JCA inflow. They include the following:
- The JMS connection factory to be used by the client. This is configured as an attribute on the <jms-jca-provider> element.
- The JMS JNDI properties to be used by the client for connecting to the JMS provider. These are configured as an attributes on the <jms-jca-provider> element (
jndi-*). - The JMS bus endpoint destination configurations. These are configured on the <jms-message-filter> elements inside the <jms-bus> within the <jms-jca-provider> element.
ServiceInvoker class, as well as other components that use the system's connection pooling functionality. (It is important to avoid using this to pool JCA-managed connections.)
- Routing actions that use the
ServiceInvokerclass such as the static- and content-based routers. - Any gateway listeners that deliver messages to an action pipeline that is serviced by an ESB-aware JMS listener that, in turn, uses a JCA JMS provider. (Most of these gateway listeners deliver messages using the
ServiceInvokerclass.) - The JMS Router.
13.8. JNDI Extension Properties
java.naming.
13.9. Configure JNDI Extension Properties
Procedure 13.4. Task
Add the jndi-prefixes for the Appropriate JMS Provider Element
Open the configuration file in a text editor and add the jndi-prefixes for the appropriate JMS provider element with a comma-separated list of the additional prefixes you want to use:<jms-provider name="JMS" connection-factory="ConnectionFactory"> <property name="jndi-prefixes” value="test.prefix." /> <property name="test.prefix.extension1" value="extension1" /> <property name="test.prefix.extension2" value="extension2" /> </jms-provider>
Note
You can also configure the extensions property in this same location.Save
Save the file and exit.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.