activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r358823 - /incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/ActiveMQConnectionConsumer.java
Date Fri, 23 Dec 2005 16:10:55 GMT
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) {



Mime
View raw message