Chapter 13. Other Java Message Service Provider Configuration Options
13.1. Configure Java Message Service Listeners and Gateways
Procedure 13.1. Task
Open the Configuration File
Edit the FileSpecify the following parameters:
ImportantMake sure you include your JMS provider's client's JAR files in the class-path.
SaveSave the file and exit the text editor.
13.3. Set the Maximum Number of Sessions Per Connection
Procedure 13.2. Task
Open the Relevant Configuration FileOpen the component in question's JNDI configuration file in a text editor.
Set the relevant PropertiesYou 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>
NoteIf 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
|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 |
|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.6. Configure the jms-jca-provider
Procedure 13.3. Task
Edit the Configuration FileOpen 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>
SaveSave 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>.
NoteThe 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 (
- 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.
ServiceInvokerclass, 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
- The JMS Router.
13.8. JNDI Extension Properties
13.9. Configure JNDI Extension Properties
Procedure 13.4. Task
Add the jndi-prefixes for the Appropriate JMS Provider ElementOpen 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>
NoteYou can also configure the extensions property in this same location.
SaveSave the file and exit.