Databases Reference
In-Depth Information
5. Type
jmsAppMaxThreads
in the Name text field and
1
in the Count text field. Click
on the Next button.
6. Select the All servers in the cluster radio button from the PROD_Cluster option and
click on the Finish button.
7. Click on the New button again and select the Work Manager radio button. Click on
the Next button.
8. Type
jmsAppWM
in the Name text field and click on the Next button.
9. Select the All servers in the cluster radio button from the PROD_Cluster option and
click on the Finish button.
10. Click on the newly created jmsAppWM work manager. Select the
jmsAppMaxThreads
option from the Maximum Threads Constraint drop-down
menu. Check the Ignore Stuck Threads checkbox and click on the Save button.
11. Click on the Activate Changes button to finish.
Now associate the
jmsAppWM
work manager to be used by the
JMSApp
application, by editing
the file descriptor
META-INF/weblogic-ejb-jar.xml
:
1. Edit the file
META-INF/weblogic-ejb-jar.xml
and add the tag
<dispatch-
policy>
:
<weblogic-enterprise-bean>
<ejb-name>QueueMDB</ejb-name>
<message-driven-descriptor>
...
</message-driven-descriptor>
<dispatch-policy>jmsAppWM</dispatch-policy>
</weblogic-enterprise-bean>
2. Save and repack the
JMSApp
application.
3. Redeploy the
JMSApp
application.
How it works...
The
QueueMDB
now consumes the JMS Queue with a maximum of 1 thread instead of 16.
Controlling the JMS Queue consumers is important to prevent too much concurrency in the
environments with a lot of JMS Queues. In a scenario where a hypothetic application uses 20
JMS Queues and there is a large backlog of messages in them, WebLogic can use up to 320
threads (20 Queues * 16 consumer threads).
Search WWH ::
Custom Search