Collapse All Expand All

.NET Framework Class Library
Tibems Class See Also

[TIBCO.EMS .NET client library 6.0 documentation]

Sets if ExceptionListener set on the Connection should be called for all the following events: disconnected, each reconnect attempt, and reconnected.

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

# Syntax

    public static void SetExceptionOnFTEvents(
    	bool callExceptionListener
    )

    Public Shared Sub SetExceptionOnFTEvents ( _
    	callExceptionListener As Boolean _
    )

    public:
    static void SetExceptionOnFTEvents(
    	bool callExceptionListener
    )

#### Parameters

callExceptionListener
  Type: System..::.Boolean

  When true, the connection's ExceptionListener catches an EMSException, which contains the server url from which the client got disconnected from, the server url the client is attempting to reconnect to, and the server url to which the client has reconnected to. Each of these events triggers the call to the exception listener.

  When false, fault-tolerant events such as initial disconnection and further reconnect attempts do not trigger call to the exception listener.

# Remarks

Similarly to Tibems.SetExceptionOnFTSwitch, if this method is called and if a Connection's ExceptionListener is set, (and the connection has FT urls), then all above events will trigger the call to the ExceptionListener.OnException callback with an EMSException which has the vendor error code (EMSException.ErrorCode) set to the String in the form:

| Copy Code
--- | ---
    FT-SWITCH: event

where event is:

- Disconnected from server url, will attempt to reconnect
- Reconnecting to next server url, attempt n out of m
- Reconnected to server url

An application can recognize such calls by analyzing the error code in the passed EMSException and perform necessary actions. Notice that this method replaces the method Tibems.SetExceptionOnFTSwitch(), which means that if both are called, only one "reconnected" event will be passed to the ExceptionListener.OnException callback (the one described above). We recommend that if Tibems.SetExceptionOnFTSwitch() was formerly used, and the user wishes to capture all FT events, this new property be used instead and the ExceptionListener.OnException callback modified to handle these new vendor error codes.

Note: When the exception listener is called, the exception listener is not allowed to call any EMS method. To do so in this case risks a deadlock in the client.

# See Also

Tibems Class
TIBCO.EMS Namespace