By default, WebSphere Commerce configuration
provides two inbound listeners: one serial listener and one parallel
listener. To use multiple inbound queues, you must define multiple inbound
listeners for IBM MQ.
To add another listener:
Procedure
-
Increase the number of threads for serial listeners:
-
Define JMS queue destinations in WebSphere Application Server Administrative Console. See Creating IBM MQ messaging provider queue destinations for more
information.
-
Create a backup copy of the instance_name.xml file in
case your changes cause errors.
-
Open the instance_name.xml file in a text editor and
locate the snippet that defines a default inbound listener:
<Inbound>
<InboundSerialConnector
TimeToReconnect="600"
default="true"
enabled="true" id="1" name="Listener for IBM MQ (JMS Inbound) - Serial">
</InboundSerialConnector>
-
Add a definition:
<InboundSerialConnector
TimeToReconnect="600"
default="true"
enabled="true" id="3" name="Listener for IBM MQ (JMS Inbound) - Serial - Custom">
<JNDI
JndiName="eis/JCAJMS" display="false"/>
<ConnectionSpec
ClassName="com.ibm.commerce.messaging.adapters.jcajms.JCAJMSConnectionSpec" default="true">
<EditableProperty
Admin="factory"
display="false"
editable="Yes"
name="setConnectionFactory" value="JMSQueueConnectionFactory"/>
<EditableProperty
Admin="inQueue"
display="false"
editable="Yes"
name="setInboundQueue" value="CustomJMSSerialInboundQueue"/>
<EditableProperty
Admin="errorQueue"
display="false"
editable="Yes"
name="setErrorQueue" value="JMSErrorQueue"/>
<EditableProperty
Admin="outQueue"
display="false"
editable="Yes"
name="setOutboundQueue" value="JMSOutboundQueue"/>
</ConnectionSpec>
<InteractionSpec
ClassName="com.ibm.commerce.messaging.adapters.jcajms.JCAJMSInteractionSpec" default="true">
<EditableProperty
Admin="timeOut"
display="false"
editable="Yes"
name="setTimeOut" value="4"/>
<EditableProperty
Admin="mode"
display="false"
editable="Yes"
name="setMode" value="2"/>
</InteractionSpec>
</InboundSerialConnector>
Note:
- Ensure that you substitute the correct JMS object names for the connection factories and queue
destinations.
- Ensure that you set the ID to a unique number.
-
Propagate the changes made to your WebSphere Commerce configuration file. For instructions on
propagating these changes, see Propagating changes to the WebSphere Commerce configuration file.
-
Restart WebSphere Commerce Server for the changes
to take effect.
-
Increase the number of threads that are running parallel to the listener:
-
Open the Configuration Manager.
-
Navigate to Listener for IBM MQ (JMS_Inbound)-Parallel.
-
Increase the number of threads in the Threads property.
-
Click Apply.
-
After your changes are applied, update the work manager thread pool size and the total number
of database connections to accommodate the increased maximum number of listener threads. See WebSphere Application Server considerations for more information.
- Increase the maximum number of work manager threads.
- Open the WebSphere Application Server Administrative Console.
- Navigate to .
- Under Thread pool properties, enter the new value for the
Maximum number of threads property.
- Save your changes.
- Increase the database connection pool size.
- Open the WebSphere Application Server Administrative Console.
- Browse to .
Where db_type is either DB2 or Oracle.
- Increase the database connection pool size by the same number of work manager threads that you
added.
- Save your changes.