4 Replies Latest reply on Nov 3, 2003 3:31 PM by Mike Karrys


    Mike Karrys Newbie

      I have been porting my application to 3.2.2 from 3.0.6 and have run into the following problem. I modifed the oil-service.xml and hard coded my servers IP address into the BindAddress and I can now connect to the server from my remote client. However after the client receives and processes the first message I receive the following error on the client and server.

      DEBUG [main] - Extracting SpyConnectionFactory from reference
      DEBUG [main] - The GenericConnectionFactory is: GenericConnectionFactory:[server=org.jboss.mq.il.oil.OILServerIL@13e58d4,connectionProperties={OIL_TCPNODELAY_KEY=yes
      , PingPeriod=60000, OIL_PORT_KEY=8090, ClientILService=org.jboss.mq.il.oil.OILClientILService, OIL_ADDRESS_KEY=}]
      DEBUG [main] - CreateConnections: Before createQueueConnection.
      DEBUG [main] - Setting the clockDaemon's thread factory
      DEBUG [main] - Handing out ClientIL: org.jboss.mq.il.oil.OILClientILService
      DEBUG [OILClientILService-0] - Waiting for the server to connect to me on port 4019
      DEBUG [main] - CreateConnections: Before setClientID.
      DEBUG [main] - CreateConnections: Before createQueueSession.
      DEBUG [main] - SpyDestinationObjectFactory->getObjectInstance()
      DEBUG [main] - SpyDestinationObjectFactory->getObjectInstance()
      LoginFrame.BEFORE mwua.sendRequest
      DEBUG [AWT-EventQueue-0] - SpyDestinationObjectFactory->getObjectInstance()
      DEBUG [AWT-EventQueue-0] - SpyConnection: deleteDestination(dest=QUEUE.JMS_TQ4)
      DEBUG [AWT-EventQueue-0] - SpySession: deleteDestination(dest=QUEUE.JMS_TQ4)
      DEBUG [AWT-EventQueue-0] - Session closing.
      DEBUG [AWT-EventQueue-0] - Message consumer closing.
      DEBUG [AWT-EventQueue-0] - Connection: removeSession(dest=QUEUE.JMS_TQ4)
      WARN [AWT-EventQueue-0] - The subscription was registered with a destination that does not exist !
      javax.jms.InvalidDestinationException: The subscription was registered with a destination that does not exist !
      at org.jboss.mq.server.ClientConsumer.removeSubscription(ClientConsumer.java:246)
      at org.jboss.mq.server.JMSDestinationManager.unsubscribe(JMSDestinationManager.java:619)
      at org.jboss.mq.server.JMSServerInterceptorSupport.unsubscribe(JMSServerInterceptorSupport.java:250)
      at org.jboss.mq.server.TracingInterceptor.unsubscribe(TracingInterceptor.java:655)
      at org.jboss.mq.server.JMSServerInvoker.unsubscribe(JMSServerInvoker.java:250)
      at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:317)

      I connect to a defined queue on the server but use a temporary queue for the return. Can someone tell me what might be wrong.


        • 1. Re: InvalidDestinationException
          Adrian Brock Master

          You are deleting the temporary destination while you still
          have a receiver listening for a message.

          When you close the session it tries to close the receiver.
          This gives a warning because the temporary queue no longer
          exists on the server.


          • 2. Re: InvalidDestinationException
            Mike Karrys Newbie

            This code has been working for months under 3.0.6 but fails when ported to 3.2.2. I am using theQueueRequestor. Has its behaviour changed between 3.0.6 and 3.2.2? The following works under 3.0.6 but not under 3.2.2.

            On the client side I do this:
            After setting up and starting the queue connection and getting a session queue I.

            TemporaryQueue temporaryQueue = null;
            QueueRequestor requestor = null;

            temporaryQueue = queueSession.createTemporaryQueue();

            requestor = new QueueRequestor(queueSession, controllerQueue );

            requestObjectMessage = queueSession.createObjectMessage();

            Modify object message.

            responseObjectMessage = (ObjectMessage) requestor.request(requestObjectMessage);

            On the server side I have a message bean which receives messages on the controller queue. I create and start the connection in the usual way. After receiving and processing the message I send a return message with the following.

            Queue temporaryQueue = (Queue) message.getJMSReplyTo();
            queueSender = queueSession.createSender( temporaryQueue );

            ObjectMessage responseObjectMessage = queueSession.createObjectMessage();

            // This sender fails with InvalidDestinations
            queueSender.send( temporaryQueue, responseObjectMessage );

            Is this the correct way to use a TemporaryQueue. The javadocs for QueueRequestor say that it creates a TemporaryQueue and then waits for a response on it. Does this imply that it modifies the ObjectMessage attributes? If so way would it just not overwrite my TemporaryQueue and just work anyway or is the problem on the server side?


            • 3. Re: InvalidDestinationException
              Adrian Brock Master

              Yes the behaviour has changed between 3.0.6 and 3.2.2
              Temporary queues now work.
              In 3.0.6 they were a massive memory leak because they
              were never deleted after use.

              The requestor now closes the session after use
              and deletes the temporary queue (as per spec)
              This might be your problem?
              Otherwise a temporary queue only lasts as long as the connection
              that opened it.


              • 4. Re: InvalidDestinationException
                Mike Karrys Newbie


                Thanks you.

                I took out all the crud I had put in to get around the weird problems with 3.0.6 and everything works faster and better.