0 Replies Latest reply on Jul 14, 2003 12:27 PM by funkyjive

    JMS & Security

    funkyjive Newbie

      My JBoss: 3.2.1

      Error: javax.jms.JMSSecurityException: The login id has an assigned client id. That client id is already connected to the server!

      I get this exception and I was wondering if it is a problem with my conceptual understanding or a bug.

      I have a client app that tries to pubish to a topic secured by access restrictions. So I create a connection to the topic using:
      tcf = (TopicConnectionFactory) ctx.lookup("ConnectionFactory");
      tc = tcf.createTopicConnection("john","needle");

      That works fine by itself. But, what I'd also like to do is optionally be able to include a temporary queue as a reply queue. And so the code will also sometimes do this before doing the above:

      qcf = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");
      qc = qcf.createQueueConnection("john","needle");
      qs = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
      replyQueue = qs.createTemporaryQueue();

      In the instance where I create a temporary reply queue, the call to create the topic factory fails with the exception above.

      Is there a concept I am missing about how that client id is managed? Or is this an issue?

      Please advise. I am trying to code this simple JMS client to be as portable to all app servers as possible.