3 Replies Latest reply on Mar 22, 2004 9:49 AM by Marcelo Klein

    JMS HTTPIL Ping Question

    Marcelo Klein Newbie

      Hi! I'm using the HTTP IL service to connect some JMS clients to the JBoss servers.
      In my app, I'm sending a JMS message to the client every 10 secs, to know if it is alive. If it is not alive, it will throw an exception, and I''ll know the client is dead.

      This works fine when I use the UIL2 IL, no problem at all. But whenever I use the HTTPIL IL, and I kill (explicitly shut down the swing client) the server keeps sending the JMS message as if the client were alive (which is not the case!).

      So here's my question...
      Is it ok that the HTTPIL (using HTTPS) does not detect the JMS client disconnection, and is able to keep sending messages instead of throwing an exception? Or this is a problem? Maybe my config files?

      Thanks, Marcelo.

        • 1. Re: JMS HTTPIL Ping Question
          Adrian Brock Master

          I don't understand your question?

          HTTP is a stateless protocol, unlike UIL2.

          How can sending a message to a client help you? You send the message to the server
          not the client?
          sender -> server
          server -> client

          If you want to detect client inactivity, you can use the ClientMonitorInterceptor,
          see deploy/jms/jbossmq-service.xml

          Regards,
          Adrian

          • 2. Re: JMS HTTPIL Ping Question
            Marcelo Klein Newbie

            >I don't understand your question?
            I need a way to detect client disconnection, to inform to my own system to erase the client from a connected list.

            HTTP is a stateless protocol, unlike UIL2.
            > OK

            >How can sending a message to a client help you? You send the message to the server
            >not the client?
            This helps me this way: I establish a TemporaryQueueConnection from every client to the server. If a clients needs to send a message to the server, it sends a message to a preexistent and known queue, and sets the Reply-to header to the TemporaryQueue.
            This way, I can associate any client with its queue.
            So every 10 seconds I send a message to every tempQueue I have. If the message send fails, I get an exception, and I know I have to remove that client from the connected list. Am I clear?
            Well, this works with UIL2, but not with the HTTPIL, and I don't know why.
            Any idea?

            >If you want to detect client inactivity, you can use the ClientMonitorInterceptor,
            >see deploy/jms/jbossmq-service.xml
            I'll see if I can override and add my own interceptor in the top of the chain.

            Thanks, Marcelo

            • 3. Re: JMS HTTPIL Ping Question
              Marcelo Klein Newbie

              any ideas?