Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awRegister | awRegisterTxClientConnectionCallback
 
awRegisterTxClientConnectionCallback
BrokerError awRegisterTxClientConnectionCallback(
BrokerTxClient txclient,
BrokerConnectionCallback func,
void *client_data);
txclient
The transactional client for whom the callback function is being registered.
func
The callback function will be invoked when this transactional client is disconnected or reconnected. This may be set to NULL to remove a callback function previously registered for the transactional client.
client_data
Data that is to be passed to the callback method. This may be set to null.
Registers a connection callback function func for the txclient that will be invoked if this client is disconnected or reconnect. If a callback function was already registered for this client, it will be replaced by the new callback function.
You may un-register a previously registered callback function by invoking this function with a null func parameter.
The callback function will be called with connect_state set to the following:
AW_CONNECT_STATE_DISCONNECTED
If the client is disconnected.
AW_CONNECT_STATE_CONNECTED
If the client connection is re-established (only happens if automatic reconnect is enabled).
AW_CONNECT_STATE_RECONNECTED
If the disconnect is discovered, but the connection is re-established immediately (only happens if automatic reconnect is enabled).
Possible BrokerError major codes
Meaning
AW_ERROR_INVALID_CLIENT
The client has been destroyed or disconnected.