2 Replies Latest reply on Jun 7, 2004 5:05 PM by adrian.brock

    Temporary Queue destroyed listener?

    mosseri

      Hello all,

      I have a Temporary queue being created by a client that is connecting to the server (over UIL2). I would like to be notified if the client's connection is broken, but on the server. I've browsed the JMX console and the DestinationManager gets notified of the queue being closed immediately. I can't find anything in the JMS spec about this, but I am open to suggestions of any implementation.

      I've tried setExceptionListener on the server, but I don't think the QueueConnection I'm getting is necessarily shared or directly to the client. I am getting it from the QueueConnectionFactory in JNDI. I am then creating a new QueueConnection, QueueSession and QueueSender each time I need to send a message to the client (inside a stateless session bean). Should I be reusing it and not closing it? The app is going to be deployed in a cluster over HAJNDI.

      The end result I am looking for is to call a bean method or publish a JMS message to a topic with the queue name being destroyed.

      Thanks,

      Mike

        • 1. Re: Temporary Queue destroyed listener?
          mosseri

          I'd also like a way to check and see if a temporary queue is still around without going through the process of trying to send a message to that queue. This goes hand-in-hand with the above.

          Thanks again,

          Mike

          • 2. Re: Temporary Queue destroyed listener?

            To handle both requests you would need to customise the DestinationManager
            since neither is part of the spec or supported by JBossMQ.

            You might be able to do the second (does a temporary queue still exist)
            using session.createQueue() - but you need to know the internal name of the queue
            as reported by TemporaryQueue.getName()