Return-Path: Delivered-To: apmail-geronimo-activemq-dev-archive@www.apache.org Received: (qmail 44092 invoked from network); 13 Jul 2006 09:19:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jul 2006 09:19:09 -0000 Received: (qmail 68093 invoked by uid 500); 13 Jul 2006 09:19:08 -0000 Delivered-To: apmail-geronimo-activemq-dev-archive@geronimo.apache.org Received: (qmail 68071 invoked by uid 500); 13 Jul 2006 09:19:08 -0000 Mailing-List: contact activemq-dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-dev@geronimo.apache.org Received: (qmail 68062 invoked by uid 99); 13 Jul 2006 09:19:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 02:19:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 02:19:06 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1G0xLK-0000zU-Is for activemq-dev@geronimo.apache.org; Thu, 13 Jul 2006 02:18:46 -0700 Message-ID: <5304689.post@talk.nabble.com> Date: Thu, 13 Jul 2006 02:18:46 -0700 (PDT) From: BigSam72 To: activemq-dev@geronimo.apache.org Subject: Re: Bug in MessageConsumer::receive In-Reply-To: <5304611.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-Sender: radek.sedmak@physter.com X-Nabble-From: BigSam72 References: <5304611.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N My workaround: if ( message != NULL ) .... p MessageConsumer::autoAcknowledge(p message) { try { if ( message != NULL ) { // Is the message an ActiveMQMessage? (throws bad_cast otherwise) p activeMessage = p_dyncast (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.