3.1.7.1 Enqueuing a Message

Various events in the protocol require that a message be queued on a particular Session object. This section describes how this is done.

If it is possible to add the provided message to the end of the Message List of the last Boxcar object, in the Boxcar Queue associated with the provided Session object, then it MUST be added to that Boxcar object. (The constraints governing whether it is possible to add a message to the list are provided in section 2.1.1.2.) Otherwise, a new Boxcar object MUST be allocated and added to the end of the Boxcar Queue associated with the provided Session object; the message MUST then be added to the end of the Message List in new Boxcar object instead.

An MSDTC Connection Manager: OleTx Multiplexing Protocol (CMP) implementation can choose to transmit the Boxcar object at the head of the Boxcar Queue at any time, as long as it contains at least one message; however, an implementation SHOULD transmit this Boxcar object as soon as possible when there is at least one other Boxcar object in the Boxcar Queue. Boxcars MUST be formatted and transmitted as described in section 2.1.1.1.