|
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g Release 3 (10.1.3) B14428-01 |
|
![]() Previous |
![]() Next |
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 re deliveries, the message is deemed undeliverable and is handled according to the policies of your message service provider. For example, OracleAS 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:
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 max-delivery-count 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 maximum delivery count to 3, you would do as follows:
<message-driven-deployment ... max-delivery-count="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 maxDeliveryCount 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>
In either case, if you change this property using this method, you must restart OC4J to apply your changes.