Collapse All Expand All

.NET Framework Class Library
Session Class See Also

[TIBCO.EMS.UFOCLIENT .NET client library 5.1 documentation]

Recover from undetermined state during message processing

Namespace: TIBCO.EMS.UFO
Assembly: TIBCO.EMS.UFO (in TIBCO.EMS.UFO.dll)

# Syntax

    public void Recover()

    Public Sub Recover

    public:
    void Recover()

# Remarks

Exceptions during message processing can sometimes leave a program in an ambiguous state. For example, some messages might be partially processed. This method lets a program return to an unambiguous state, the point within the message stream when the program last acknowledged the receipt of inbound messages. Programs can then review the messages delivered since that point (they are marked as redelivered), and resolve ambiguities about message processing.

Programs can also use this method to resolve similar ambiguities after a Connection stops delivering messages, and then starts again.

Operation

This method requests that the server do this sequence of actions:

1. Stop message delivery within the session.
2. Mark as redelivered, any messages that the server has attempted to deliver to the session, but for which it has not received acknowledgement (that is, messages for which processing state is ambiguous).

   According to the JMS specification, the server need not redeliver messages in the same order as it first delivered them.

3. Restart message delivery (including messages marked as redelivered in step 2).

When a session has transactional semantics, this method throws IllegalStateException (commit and rollback are more appropriate for transactions).

# See Also

Session Class
TIBCO.EMS.UFO Namespace