Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 14 Utilities : Utility Functions : tibems_SetAllowCloseInCallback

tibems_SetAllowCloseInCallback
Function
Purpose
Sets whether client applications can close sessions or connections, or stop connections, inside message listener callbacks.
C Declaration
tibems_status tibems_SetAllowCloseInCallback(
    tibems_bool allow);
COBOL Call
CALL "tibems_SetAllowCloseInCallback",
 USING BY VALUE isAllowed,
       RETURNING tibems-status
END-CALL.
Parameters
 
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.
See Also
tibemsMsgCallback on page 174
tibemsMsgConsumer_Close on page 165
tibemsConnection_Close on page 212
tibemsSession_Close on page 297
tibems_GetAllowCloseInCallback on page 392

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved