Kbase 41704: javax.jms.JMSException: The session and the connection consumer must be created from the same connection.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Solution ID: P11704
FACT(s) (Environment):
SonicMQ 3.5
SYMPTOM(s):
javax.jms.JMSException:
The session and the connection consumer must be created
from the same connection.
CAUSE:
Creating a
javax.jms.XATopicSession from a javax.jms.XATopicConnection
using the method createXATopicSession()
and using the
javax.jms.TopicSession to get with the method:
getTopicSession() from the javax.jms.XATopicSession
within a javax.jms.ServerSession of a javax.jms.ServerSessionPool
gives the following stack trace as soon as a message arrives for the
MessageListener set for the TopicSession :
javax.jms.JMSException: The session and the connection consumer must
be created from the same connection
at java.lang.Throwable.<init>(Throwable.java:96)
at java.lang.Exception.<init>(Exception.java:44)
at javax.jms.JMSException.<init>(JMSException.java:62)
at
progress.message.jclient.aspi.ConnectionConsumer$IHandler.handleMessa
ge(Unknown Source)
at
progress.message.zclient.MessageHandler.doNextWorkItem(Unknown Source
)
at
progress.message.zclient.SessionMessageProcessor.threadMain(Unknown S
ource)
at progress.message.zclient.DebugThread.run(Unknown Source)
FIX:
Using the javax.jms.XATopicSession instead of the TopicSession
as session object for the javax.jms.ServerSession solves the problem.