Setting a Redelivery Delay Overriding the Redelivery Delay on a Destination

6-2 Programming JMS for Oracle WebLogic Server All messages consumed and subsequently rolled back or recovered by a session receive the redelivery delay for that session at the time of rollback or recovery. Messages consumed by multiple sessions as part of a single user transaction will receive different redelivery delays as a function of the session that consumed the individual messages. Messages that are left unacknowledged or uncommitted by a client, either intentionally or as a result of a failure, are not assigned a redelivery delay.

6.1.1.1 Setting a Redelivery Delay

A session inherits the redelivery delay from its connection factory when the session is created. The RedeliveryDelay attribute of a connection factory is configured using the Administration Console. For more information, see Configure connection factories in the Oracle WebLogic Server Administration Console Help. The application that creates the session can then override the connection factory setting using WebLogic-specific extensions to the javax.jms.Session interface. The session attribute is dynamic and can be changed at any time. Changing the session redelivery delay affects all messages consumed and rolled back or recovered by that session after the change except when the message is in a session using non-durable topics. The method for setting the redelivery delay on a session is provided through the weblogic.jms.extensions.WLSession interface, which is an extension to the javax.jms.Session interface. To define a redelivery delay for a session, use the following methods: public void setRedeliveryDelay long redeliveryDelay throws JMSException; public long getRedeliveryDelay throws JMSException; For more information on the WLSession class, refer to the weblogic.jms.extensions.WLSession Javadoc.

6.1.1.2 Overriding the Redelivery Delay on a Destination

Regardless of what redelivery delay is set on the session, the destination where a message is being rolled back or recovered can override the setting. The redelivery delay override applied to the redelivery of a message is the one in effect at the time a message is rolled back or recovered. The RedeliveryDelayOverride attribute of a destination is configured using the Administration Console. For more information, see: ■ Configure queue message delivery failure options in the Oracle WebLogic Server Administration Console Help Note: When a session is using non-durable topics, the setRedeliveryDelay method does not apply. This may result in unexpected behavior if you are using a non-durable topic consumer to drive a workflow. Managing Your Applications 6-3 ■ Configure topic message delivery failure options in the Oracle WebLogic Server Administration Console Help

6.1.2 Setting a Redelivery Limit for Messages