4 Replies Latest reply on Jun 28, 2005 5:40 PM by Yan Pritzker

    Cannot create a consumer for a temporary destination from a

    Lev Khusid Newbie

      Hi,

      I just migrated our app from JBoss 2.4.x to JBoss 3.2.7 and ran into this probplem/exception:


      "javax.jms.JMSException: Cannot create a consumer for a temporary destination from a different session. TOPIC.JMS_TT4"


      Our remote java client creates a temporary topic and then later on tries to create a subscriber for it at which point it gets the exception mentioned above. However, both 'createTemporaryTopic(...)' and 'createSubscriber(...)' are performed using the same TopicConnection instance. Now according to the JMS 1.1 spec:


      "Although sessions are used to create temporary destinations, this is only for convenience. Their scope is actually the entire connection. Their lifetime is that of their connection, and any of the connection?s sessions is allowed to create a MessageConsumer for them."


      So why JBossMQ then complains about creating a consumer for a temporaty topic from a session different from the one that created it even though it is under the same topic connection? By the way, the same code worked just fine in 2.4.x.

      Any suggestions? Please advise...

      Thanks,

      lk