3.1.7.1 RPC_QUEUE_HANDLE Context Handle Rundown Routine

This event occurs on rundown of a context handle of type RPC_QUEUE_HANDLE (section 2.2.1.1.2), as specified in [C706] section 5.1.6.

 When processing this event, the server MUST:

  • Locate a LocalQueueContextHandle (section 3.1.1.3) ADM element instance in the server's iLocalQueueContextHandleTable (section 3.1.1.2) where the value of the Handle attribute of the LocalQueueContextHandle ADM element instance equals hQueue.

  • If such a LocalQueueContextHandle ADM element instance exists:

    • Declare iLocatedLocalQueueContextHandle and set it to a reference to the located LocalQueueContextHandle ADM element instance.

    • Generate a Close Queue ([MS-MQDMPR] section 3.1.7.1.6) event with the following argument value:

      • iQueueDesc := iLocatedLocalQueueContextHandle.OpenQueueDescriptorReference

    • Delete iLocatedLocalQueueContextHandle from iLocalQueueContextHandleTable.

    • Take no further action and return MQ_OK (0x00000000).

  • Else:

    • Locate a RemoteQueueProxyHandle (section 3.1.1.5) ADM element instance in the server's iRemoteQueueProxyHandleTable (section 3.1.1.4) where the value of the Handle attribute of the RemoteQueueProxyHandle ADM element instance equals hQueue.

    • If no such RemoteQueueProxyHandle ADM element instance exists, take no further action.

    • Declare iLocatedRemoteQueueProxyHandle and set it to a reference to the located RemoteQueueProxyHandle ADM element instance.

    • Invoke the RemoteQMCloseQueue method of the qm2qm RPC interface as specified in [MS-MQQP] section 3.1.4.4 using the binding handle in iLocatedRemoteQueueProxyHandle.RemoteBindingHandle and the following parameter value:

      • pphContext := iLocatedRemoteQueueProxyHandle.RemoteHandle

    • Upon completion of RemoteQMCloseQueue, successful or not, dispose of the iLocatedRemoteQueueProxyHandle.RemoteBindingHandle as appropriate.

    • Delete iLocatedRemoteQueueProxyHandle from iRemoteQueueProxyHandleTable.