3.2.4.12 Closing a Cursor

The message queuing application MUST specify the QUEUE_CONTEXT_HANDLE_NOSERIALIZE (section 2.2.4.1) handle and the cursor handle to be closed.

  • If there are any pending requests associated with the cursor handle, the client SHOULD<36> cancel them as specified in section 3.2.4.11.

  • The client MUST call the R_CloseCursor (Opnum 5) (section 3.1.4.5) method with the following:

    • The phContext parameter set to a QUEUE_CONTEXT_HANDLE_NOSERIALIZE handle that has been returned by the server in the pphQueue output parameter of a prior call to the R_OpenQueue (Opnum 2) (section 3.1.4.2) method and that MUST NOT have been previously closed through a call to the R_CloseQueue (Opnum 3) (section 3.1.4.3) method. This value MUST NOT be NULL.

    • The phCursor parameter set to the cursor handle.

  • The client MUST remove the cursor handle from its state.