|
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g Release 3 (10.1.3) B14428-01 |
|
![]() Previous |
![]() Next |
By configuring the number of listener threads to x, where x is greater than one (see "Using Deployment XML"), OC4J will instantiate x number of message-driven bean instances all listening to the message-driven bean's message location in parallel.
Topics can only have one thread. Queues can have more than one.
You set the number of listener threads in the orion-ejb-jar.xml file. How you configure this value depends on the type of message-service provider you are using:
Non-J2CA Adapter Message Service Provider
If you are using a non-J2CA adapter message service provider like OracleAS JMS or Oracle JMS (OJMS), use the listener-threads attribute of the <message-driven-deployment> element.
For example, if you are using OracleAS JMS or Oracle JMS (OJMS), and you wanted to set the number of listener threads to 3, you would do as follows:
<message-driven-deployment ... listener-threads="3" ... </message-driven-deployment>
J2CA Adapter Message Service Provider
If you are using a J2CA adapter message service provider, use the <config-property> element to set the listenerThreads configuration property.
For example, if you are using a J2CA adapter message service provider, and you wanted to set the number of listener threads to 3, you would do as follows:
<message-driven-deployment ... > ... <config-property> <config-property-name>listenerThreads</config-property-name> <config-property-value>3</config-property-value> </config-property> ... </message-driven-deployment>
In either case, if you change this property using this method, you must restart OC4J to apply your changes.