Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.1.0) Part Number B28221-02 |
|
|
View PDF |
By default, OC4J uses one receiver thread to poll for messages from the message location.
Having more than one receiver thread allows messages to be received in parallel which can improve performance.
If your message location is a Topic, the number of receiver threads is fixed to one.
If your message location is a Queue, you can configure the number of receiver threads (see "Using Deployment XML").
Note that the minimum number of bean instances in the MDB pool should be at least the same as the number of receiver threads to avoid blocking receiver threads from acquiring a bean instance from the pool to process messages.
For more information, see:
You configure parallel message processing in the orion-ejb-jar.xml
file. How you configure this option depends on the type of message-service provider you are using:
In either case, you must restart OC4J to apply your changes.
J2CA Adapter Message Service Provider
If you are using a J2CA adapter message service provider, use the <config-property>
element to set the ReceiverThreads
configuration property.
For example, if you are using a J2CA adapter message service provider, and you want three message-driven bean instances receiving from the message location in parallel, set the ReceiverThreads
configuration property to 3
, as follows:
<message-driven-deployment ... > ... <config-property> <config-property-name>RecieverThreads</config-property-name> <config-property-value>3</config-property-value> </config-property> ... </message-driven-deployment>
For more information on ReceiverThreads
, see Table B-2.
Non-J2CA Adapter Message Service Provider
If you are using a non-J2CA adapter message service provider like OEMS JMS or OEMS JMS Database, use the <message-driven-deployment>
element listener-threads
attribute.
For example, if you are using OEMS JMS or OEMS JMS Database, and you want three message-driven bean instances receiving from the message location in parallel, set the listener-threads
attribute to 3
, as follows:
<message-driven-deployment ... listener-threads="3" ... </message-driven-deployment>
For more information on listener-threads
, see Table A-3.
Note:
Oracle recommends that you access a message service provider using a J2CA resource adapter such as the Oracle JMS Connector. For more information, see: