Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.5.0) Part Number E13981-01 |
|
|
View PDF |
You can configure how a message-driven bean's listener thread responds to connection failures due to such events as network and JMS server outages.
These options are applicable to only container-managed transactions in a message-driven bean.
You can configure connection failure recovery options using the orion-ejb-jar.xml
file (see "Using Deployment XML").
For more information about failover, see "Understanding OC4J EJB Application Clustering Services".
You set the dequeue retry count and interval in the orion-ejb-jar.xml
file. How you configure this value 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 access your message-service provider using a J2CA resource adapter, the Oracle JMS Connector does an infinite retry of polling for the JMS resource and this retry interval can be configured in the activation configuration property, EndpointFailureRetryInterval
as shown in Example 18-6.
Note that the recovery of message after retry does not guarantee message ordering, and messages can be lost or duplicated when MDB subscription to the JMS topic is non-durable.
For more information, see EndpointFailureRetryInterval
in Table B-2.
Example 18-6 Configuring EndpointFailureRetryInterval in orion-ejb-jar.xml
<message-driven-deployment ... > ... <config-property> <config-property-name>EndpointFailureRetryInterval</config-property-name> <config-property-value>20000</config-property-value> </config-property> ... </message-driven-deployment>
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 dequeue-retry-count
and dequeue-retry-interval
attribute of the <message-driven-deployment>
element. The default dequeue retry count is zero and the default dequeue retry interval is 60 seconds.
For example, if you are using OEMS JMS or OEMS JMS Database, and you wanted to set the dequeue retry count to 3 and the dequeue retry interval to 90 seconds, you would do as follows:
<message-driven-deployment ... dequeue-retry-count="3" dequeue-retry-interval="90" ... </message-driven-deployment>
For more information on dequeue-retry-count
and dequeue-retry-interval
, 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: