question: void acknowledge ( ) throws CommitFailedException { if ( _logger . isLoggable ( Level . FINE ) ) { _logger . fine ( "GSsessionImpl.acknowledge(): " + m_sessionID ) ; } unackedMessages . clear ( ) ; if ( this . m_isQueue && ! isAutoAck ( ) ) { if ( _logger . isLoggable ( Level . FINE ) ) { _logger . log ( Level . FINE , "Acknowledging messages. Txn=" + _tx ) ; } commitLocalTransaction ( ) ; } }
target:  Note that the acknowledge method of Message acknowledges all messages received on that messages session. Message.acknowledge() method: Clarify that the method applies to all consumed messages of the session. Rationale for this change: A possible misinterpretation of the existing Java API documentation for Message.acknowledge assumed that only messages received prior to ?this? message should be acknowledged. The updated Java API documentation statement emphasizes that message acknowledgment is really a session-level activity and that this message is only being used to identify the session in order to acknowledge all messages consumed by the session. The acknowledge method was placed in the message object only to enable easy access to acknowledgment capability within a message listener?s onMessage method. This change aligns the specification and Java API documentation to define Message.acknowledge in the same manner. Method acknowledging the received messages. We iterate over all the Destination names (the m_deliveries hash) and then on each MessageAcks vec we perform the actual write of JMSAckDataEntry to the space, using the info inside each Ack obj. The Ack obj, is an inner class wrapper that holds all the required information for a successful acknowledge.