tibemsSession_Recover


Function

Purpose

Recover from undetermined state during message processing.

C Declaration

tibems_status tibemsSession_Recover( 
    tibemsSession session ); 

COBOL Call

CALL "tibemsSession_Recover" 
     USING BY VALUE session, 
           RETURNING tibems-status 
END-CALL. 

session has usage pointer.

Parameter
Description
session
Recover this session.

Remarks

Exceptions during message processing can sometimes leave a program in an ambiguous state. For example, some messages might be partially processed. This function 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 function to resolve similar ambiguities after a tibemsConnection stops delivering messages, and then starts again.

Operation

This function 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).
  3. According to the JMS specification, the server need not redeliver messages in the same order as it first delivered them.

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

Transactions

When a session has transactional semantics, this call is inappropriate, and returns TIBEMS_INVALID_SESSION (commit and rollback are more appropriate with transactions).


TIBCO Enterprise Message Service™ C and COBOL Reference
System Release 4.3, February 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com