JMS: How to inform Consumer about the unavailability of Server

Discussions

EJB design: JMS: How to inform Consumer about the unavailability of Server

  1. Hi all

    I have couple of questions.

    1. I'm having a typical situation where in I had to intimate the clients connected to my JMS Provider when provider fails. I use the JME ExceptionListener mechanism but unfortunately the application server(Jrun4) seems not placing the exception in there. So I'm wondering if there is any other way of letting the clients know whether Provider is running or shut down.

    2. My clients are MessageListeners and gets their refresh when a message from Database arrives (JMS Message indicating the table has been updated and hence go for refresh) as and when data changes. Currently one the client is up and running, it will keep a connection live for life long to react to the messages. Is there any way around this situation.

    Thanks for all
    MS
  2. 1. You could use a QueueBrowser to browse the records from a queue hosted by a particular provider. Browsing reads messages from the queue without consuming them - you can browse for just one record to be efficient. If you get a JMSException or a NamingException (when getting the provider) then you can report this back to the user.