tibems_SetAllowCloseInCallback
Function
Purpose
Set whether client applications can close sessions or connections, or stop connections, inside message listener callbacks.
COBOL Call
CALL "tibems_SetAllowCloseInCallback", USING BY VALUE isAllowed, RETURNING tibems-status END-CALL.
Parameters
Parameter | Description |
---|---|
allow | When true, the application will proceed without waiting for the message callbacks to return before closing a session or a connection or before stopping a connection. When false, the application will get a
TIBEMS_ILLEGAL_STATE error status.
By default, the application gets a TIBEMS_ILLEGAL_STATE status. |
Remarks
This function can be used to change the default EMS client behavior and set whether the client application can call the tibemsSession_Close, tibemsConnection_Close or tibemsConnection_Stop functions from the tibemsMsgCallback.
The default behavior is to return with a TIBEMS_ILLEGAL_STATE status and parallel the behavior specified in the JMS 2.0 specification, which the EMS client API adheres to. However, this function allows applications to override the default behavior and close or stop EMS objects inside message callbacks.