Use this task to configure WebSphere Application Server for the extended
messaging service, to specify the properties that control message handling
by JMS listeners.
To configure properties of the extended messaging service, complete the following steps:
-
Configure JMS resources for use with WebSphere Application Server, as
described in 4.6.3: Using Java Message Service (JMS) resources.
Use the MQSeries JMS administration tool to configure the WAS name space to specify that you are using WebSphere JMS/XA connection factories.
Note: To enable support for global transactions, you must use the WebSphere JMS/XA connection factories, because these ensure proper transaction behavior.
-
Edit the extended messaging configuration file to specify the properties
for each JMS destination. A sample configuration file is provided with WebSphere,
and is installed in the WebSphere samples directory.
-
Create an extended messaging configuration XML file; for example, by
copying an existing configuration file or the sample configuration file provided
with WebSphere. The configuration file should contain the following format
of XML tags:
<Config>
<Pooling>
<Timeout>timeoutMilliSeconds</Timeout>
<Threshold>maxUnusedConnections</Threshold>
</Pooling>
<Listener>
<HomeJNDIName>homeName</HomeJNDIName>
<JMSConnectionFactory>factoryName</JMSConnectionFactory>
<JMSDestination>destinationName</JMSDestination>
<JMSDestinationType>destinationType</JMSDestinationType>
<JMSSubscriptionDurability>durability</JMSSubscriptionDurability>
<JMSSubscriptionName>subscriptionName</JMSSubscriptionName>
<JMSMessageSelector>selector</JMSMessageSelector>
<JMSAcknowledgeMode>acknowledgeMode</JMSAcknowledgeMode>
<MaxRetries>retries</MaxRetries>
<MaxSessions>sessions</MaxSessions>
<Transactional>trueFalse</Transactional>
</Listener>
</Config>
-
For each separate JMS destination to be monitored, edit the XML file
to specify the properties of the JMS listener for that destination. Specify
the properties within the <Listener> and </Listener> tags, like
the example above. For more information about the property tags and their
values, see Format of the extended messaging configuration file.
-
Specify the name of the configuration file on the Configuration
file URL property of the Extended Messaging Custom Service entry
for the application server in WebSphere system management. For example, use
the WebSphere Administrative Console to complete the following steps:
-
Expand the Topology tree to display the application server
-
Click the application server to display its properties on the right side
of the console.
-
Select the Custom tab from the properties panel.
-
Select the Extended Messaging Support Service then click Edit.
If your application server was migrated from a WebSphere Advanced server installation that does not contain an Extended Messaging Support Custom Service, then you need to add the service by completing the following steps:
- Select Custom Service -> Add
- In the Name field type Extended Messaging Support Service
- In the Classname field type com.ibm.cmm.listener.JMSListenerStub
-
Type the name of the configuration file on the Configuration file
URL property.
-
Click OK on the property sheet to save
the property change.
-
Click Apply to apply the properties.
-
Specify the JMS Provider classpath for the Extended Messaging Custom
Service entry for the application server in WebSphere system management. For
example, use the WebSphere Adminitstrative Console to complete the following
steps:
-
Expand the Topology tree to display the application server.
-
Click the application server to display its properties on the right side
of the console.
-
Select the Custom tab from the properties panel.
-
Select Extended Messaging Support Service, then click Edit.
-
Specify your JMS Provider classpath on the classpath property.
-
Click OK on the property sheet to save the property
change.
-
Click Apply to apply the properties.
This task has specified values for properties of the extended messaging
service in its configuration file.
When the extended messaging service initializes, it parses the configuration
file. If the extended messaging service encounters an XMLParse error, it sends
a message to the console with the file:line:column of the error, and the entry
is ignored. If the error is considered as a fatal XML parser error, the parsing
fails and initialization of the extended messaging service terminates. You
must correct the configuration file before the extended messaging service
can be initialized.