activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BigSam72 <radek.sed...@physter.com>
Subject Re: Bug in MessageConsumer::receive
Date Thu, 13 Jul 2006 09:18:46 GMT

My workaround:  if ( message != NULL ) ....

p<IMessage> MessageConsumer::autoAcknowledge(p<IMessage> message)
{
    try
    {
        if ( message != NULL ) {
          // Is the message an ActiveMQMessage? (throws bad_cast otherwise)
          p<ActiveMQMessage> activeMessage = p_dyncast<ActiveMQMessage>
(message) ;

          // Register the handler for client acknowledgment
          activeMessage->setAcknowledger( smartify(this) ) ;

          if( acknowledgementMode != ClientAckMode )
              doAcknowledge(activeMessage) ;
        }
    }
    catch( bad_cast& bc )
    {
        // ignore
    }
    return message ;
}

-- 
View this message in context: http://www.nabble.com/Bug-in-MessageConsumer%3A%3Areceive-tf1936063.html#a5304689
Sent from the ActiveMQ - Dev forum at Nabble.com.


Mime
View raw message