3.1.3.2 Session Initialization
The following values MUST be initialized for each session:
The value of the MessageSentCount ADM element MUST be set to 0x0000.
The value of the RecoverableMessageSentCount ADM element MUST be set to 0x0000.
The value of the MessageReceivedCount ADM element MUST be set to 0x0000.
The value of the RecoverableMessageReceivedCount ADM element MUST be set to 0x0000.
The value of the RecoverableMsgAckFlags ADM element MUST be set to 0x00000000.
The value of the LastAckedRecoverableMsgSeqNumber ADM element MUST be set to 0x0000.
The value of the UnackedReceivedMsgCount ADM element MUST be set to 0x0000.
The Session Ack Wait Timer (section 3.1.2.4) MUST be stopped.
The Session Ack Send Timer (section 3.1.2.5) MUST be stopped.
The Transactional Ack Wait Timer (section 3.1.2.6) MUST be stopped.
The Order Ack Send Timer (section 3.1.2.7) MUST be stopped.
The Session Cleanup Timer (section 3.1.2.2) MUST be started.
If the OutgoingMessageTable ADM element is not empty, the Session Retry Connect Timer (section 3.1.2.3) MUST be started.
The TxOutgoingSequence ADM element MUST be set to a new instance of the OutgoingTransferSequence ADM element and initialized as follows:
LastAck.SeqNo MUST be set to 0x00000000.
The TimeOfLastAck ADM attribute MUST be set to the local system time.
The LastAckCount ADM attribute MUST be set to zero.
The ResendIntervalIndex ADM attribute MUST be set to the index of the first entry in the ResendTimerTable ADM element.
The ResendInterval ADM attribute MUST be set to the value of the first entry in the ResendTimerTable ADM element.
The ResendTime ADM attribute MUST be set to zero.
The AwaitingAck, ReceivedSessionAck, ReceivedOrderAck, and Transmitted ADM attributes of each OutgoingMessagePosition (section 3.1.1.3.1.2) ADM element instance entry in the OutgoingMessageTable ADM element MUST be set to FALSE.
The value of the UnAckedMessageCount ADM element MUST be set to the count of OutgoingMessagePosition ADM element instances with ReceivedSessionAck ADM attributes equal to FALSE in the OutgoingMessageTable ADM element.
The value of the WindowSize ADM element SHOULD<50> be set to 64.
The value of the SessionActive ADM element MUST be set to FALSE.
The value of the ReceivedAck ADM element MUST be set to FALSE.
The value of the AckWaitTimeout ADM element MUST be set based on the system configuration, which is implementation-dependent.<51>
The OrderAckTimeout ADM element MUST be set to a value of 500 milliseconds.
The DirectFormatSession ADM element MUST be set to FALSE.
The value of the MaximumOrderAckDelay ADM element SHOULD<52> be set to 10 seconds.
The value of the LastOrderAckSendTime ADM element MUST be set to the current system time, the number of seconds elapsed since midnight (00:00:00), January 1, 1970 (UTC) according to the system clock.
The value of the RecoverableAckSendTimeout ADM element MUST be set to 0xFFFFFFFF.
The RemoteQMPublicKey ADM element MUST be filled with zeroes (0x00) to indicate that it is not initialized.
The value of QueueManager.Identifier MUST be globally unique and set based on system configuration, which is implementation-dependent.<53>
The value of the PingCookie ADM element SHOULD<54> be set to 0x00000000.
The value of the SessionState ADM element MUST be set to WAITING_EC_MSG.