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();
  }
}

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 ( ) ; } }
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 .
