Products | Versions |
---|---|
TIBCO Enterprise Message Service | - |
Not Applicable | - |
Resolution:
Description:
= = = = = = =
Notification from .Net client code when EMS server switches over to a secondary server.
Environment:
= = = = = = =
Microsoft Windows
Resolution:
= = = = = =
The Tibems type exposes the following member to set if ExceptionListener set on the Connection should be called after a fault-tolerant switch.
public static void SetExceptionOnFTSwitch(
bool callExceptionListener
)
Public Shared Sub SetExceptionOnFTSwitch ( _
callExceptionListener As Boolean _
)
public:
static void SetExceptionOnFTSwitch(
bool callExceptionListener
)
Parameters
callExceptionListener
Type: System..::.Boolean
When true, the connection’s ExceptionListener catches an EMSException, which contains the name of the new server.
When false, a fault-tolerant failover does not trigger an exception in the client.
Remarks
This setting determines exception behavior when the client successfully switches to a different server (fault-tolerant failover).
When an application performs a fault-tolerant switch it may notify the Connection's ExceptionListener by calling it with EMSException providing the information about the fault-tolerant switch. If calling the Connection's ExceptionListener is set, it is called with the EMSException which has the vendor error code (EMSException.getErrorCode) set to the String in the form: FT-SWITCH: new-server-url .
An application can recognize such calls by analyzing the error code in the passed EMSException and perform any necessary actions. Notice that the ExceptionListener is called with the special EMSException only when a fault-tolerant switch has been performed successfully. In case the fault-tolerant switch has failed, the Connection's ExceptionListener will be called with regular EMSException (it will not have error code in the form 'FT-SWITCH: new-server-url') specifying that the connection to the server has been terminated. Notice that by default Connection's ExceptionListener is not called after a successful fault-tolerant switch.
Reference:
= = = = = =
.NET API reference manual