mirror of https://github.com/apache/activemq.git
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:
parent
29a6b9d1f6
commit
2c4274b997
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue