tibems_SetExceptionOnFTEvents

Function

Purpose

Set whether exception listener is called each step of the fault-tolerant switchover process.

C Declaration

tibems_status tibems_SetExceptionOnFTEvents(
    tibems_bool* callExceptionListener);

COBOL Call

CALL "tibems_SetExceptionOnFTEvents"
  USING BY VALUE callExceptionListener,
  RETURNING tibems-status
END-CALL.

Remarks

This setting determines exception behavior when the fault-tolerant client goes through phases in the failover process. If an exception listener is set on the connection, the callback is invoked when the client detects:

  • Disconnection, or TIBEMS_SERVER_DISCONNECTED.
  • Each reconnect attempt, or TIBEMS_SERVER_RECONNECTING.
  • Reconnection to the server, or TIBEMS_SERVER_RECONNECTED.

This call reports on all events during the failover process. To report only the successful reconnection event, use the tibems_setExceptionOnFTSwitch method instead.

Parameters

Parameter Description
callExceptionListener When true, the connection’s ExceptionListener catches an exception, which contains a status code indicating the state of the fault-tolerant failover: TIBEMS_SERVER_DISCONNECTED, TIBEMS_SERVER_RECONNECTING, or TIBEMS_SERVER_RECONNECTED

When false, fault-tolerant failover does not trigger an exception in the client.