Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.1.0) Part Number B28221-02 |
|
|
View PDF |
You can configure the maximum number of times OC4J will attempt the immediate re delivery of a message to a message-driven bean's onMessage
method if that method returns failure: fails to invoke an acknowledgment operation, throws an exception, or both (see "Using Deployment XML").
After this number of redeliveries, the message is deemed undeliverable and is handled according to the policies of your message service provider. For example, OEMS JMS will put the message on its exception queue (jms/Oc4jJmsExceptionQueue
).
You set the maximum delivery count in the orion-ejb-jar.xml
file. How you configure this value depends on the type of message-service provider you are using:
J2CA Adapter Message Service Provider
If you are using a J2CA adapter message service provider, use the <config-property>
element to set the MaxDeliveryCnt
configuration property.
For example, if you are using a J2CA adapter message service provider, and you wanted to set the maximum delivery count to 3, you would do as follows:
<message-driven-deployment ... > ... <config-property> <config-property-name>MaxDeliveryCnt</config-property-name> <config-property-value>3</config-property-value> </config-property> ... </message-driven-deployment>
For more information on MaxDeliveryCnt
, 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 max-delivery-count
attribute of the <message-driven-deployment>
element.
For example, if you are using OEMS JMS or OEMS JMS Database, and you wanted to set the maximum delivery count to 3, you would do as follows:
<message-driven-deployment ... max-delivery-count="3" ... </message-driven-deployment>
For more information on max-delivery-count
, 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: