Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 81473 invoked from network); 23 Dec 2005 16:11:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Dec 2005 16:11:17 -0000 Received: (qmail 73440 invoked by uid 500); 23 Dec 2005 16:11:17 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 73414 invoked by uid 500); 23 Dec 2005 16:11:16 -0000 Mailing-List: contact activemq-commits-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-commits@geronimo.apache.org Received: (qmail 73405 invoked by uid 99); 23 Dec 2005 16:11:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Dec 2005 08:11:16 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 23 Dec 2005 08:11:16 -0800 Received: (qmail 81351 invoked by uid 65534); 23 Dec 2005 16:10:55 -0000 Message-ID: <20051223161055.81350.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r358823 - /incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/ActiveMQConnectionConsumer.java Date: Fri, 23 Dec 2005 16:10:55 -0000 To: activemq-commits@geronimo.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: chirino Date: Fri Dec 23 08:10:53 2005 New Revision: 358823 URL: http://svn.apache.org/viewcvs?rev=358823&view=rev Log: Marcus reported on the mailing list that we need to provide dispatching behaviour like 3.x did to work on webshere 5.x Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/ActiveMQConnectionConsumer.java Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/ActiveMQConnectionConsumer.java URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/ActiveMQConnectionConsumer.java?rev=358823&r1=358822&r2=358823&view=diff ============================================================================== --- incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/ActiveMQConnectionConsumer.java (original) +++ incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/ActiveMQConnectionConsumer.java Fri Dec 23 08:10:53 2005 @@ -135,12 +135,21 @@ ServerSession serverSession = sessionPool.getServerSession(); Session s = serverSession.getSession(); ActiveMQSession session = null; + + if( s instanceof ActiveMQSession ) { session = (ActiveMQSession) s; + } else if (s instanceof ActiveMQTopicSession) { + ActiveMQTopicSession topicSession = (ActiveMQTopicSession) s; + session = (ActiveMQSession) topicSession.getNext(); + } else if (s instanceof ActiveMQQueueSession) { + ActiveMQQueueSession queueSession = (ActiveMQQueueSession) s; + session = (ActiveMQSession) queueSession.getNext(); } else { connection.onAsyncException(new JMSException("Session pool provided an invalid session type: "+s.getClass())); return; } + session.dispatch(messageDispatch); serverSession.start(); } catch (JMSException e) {