Collapse All Expand All

.NET Framework Class Library
Tibems Class See Also

[TIBCO.EMS .NET client library 5.1 documentation]

Sets if Close methods can be called in the IMessageListener callback.

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

# Syntax

    public static void SetAllowCloseInCallback(
    	bool allow
    )

    Public Shared Sub SetAllowCloseInCallback ( _
    	allow As Boolean _
    )

    public:
    static void SetAllowCloseInCallback(
    	bool allow
    )

#### Parameters

allow
  Type: System..::.Boolean

  When true, EMS overrides the JMS specification so client callbacks may call close methods.

  When false (the default), EMS obeys the JMS specification.

# Remarks

According to the JMS specification, Close methods (that is, MessageConsumer.Close, Session.Close, Connection.Close) cannot return while a message callback (that is, EMSMessageHandler, IMessageListener.OnMessage) is running. As a result, a message callback must not call a Close method. Doing so may cause a deadlock.

This method explicitly overrides this JMS requirement, permitting callbacks to call close without deadlock (that is, embedded close calls do not wait for callbacks to return).

Note: This method replaces the deprecated method SetAllowCallbackInClose.

# See Also

Tibems Class
TIBCO.EMS Namespace