| Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g Release 3 (10.1.3) B14428-01 |
|
![]() Previous |
![]() Next |
You can configure how often a message-driven bean's listener thread tries to re-acquire its JMS session once database failover has occurred and how many seconds to wait between retries (see "Using Deployment XML".
This value is only for CMT transactions in a message-driven bean.
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:
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 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 OracleAS JMS or Oracle JMS (OJMS), 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>
J2CA Adapter Message Service Provider
If you are using a J2CA adapter message service provider, use the <config-property> element to set the dequeueRetryCount and dequeueRetryInterval configuration properties.
For example, if you are using a J2CA adapter message service provider, and you wanted to set the number of listener threads to 3, you would do as follows:
<message-driven-deployment ... >
...
<config-property>
<config-property-name>DequeueRetryCount</config-property-name>
<config-property-value>3</config-property-value>
</config-property>
<config-property>
<config-property-name>dequeueRetryInterval</config-property-name>
<config-property-value>90</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.