Skip Headers
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g (10.1.3.5.0)

Part Number E13981-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Configuring Maximum Delivery Count

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).

Using Deployment XML

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 (in-memory/file based), use the max-delivery-count attribute of the <message-driven-deployment> element.

For example, if 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: