Marcus reported on the mailing list that we need to provide dispatching behaviour like 3.x did to work on webshere 5.x

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@358823 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2005-12-23 16:10:53 +00:00
parent 29a6b9d1f6
commit 2c4274b997
1 changed files with 9 additions and 0 deletions

View File

@ -135,12 +135,21 @@ public class ActiveMQConnectionConsumer implements ConnectionConsumer, ActiveMQD
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) {