I have a client/server system where the (EJB-based) server (= observable) should notify the client (= observer) about certain events.
My solution is as follows: The client creates a TemporaryQueue and asks the server to send event notifications as messages to this queue. If a client is no more interested in certain events, it asks the server to stop sending messages.
Now, what if the client crashes for some reason? I would expect the JMS service to notice the broken QueueConnection and to remove the TemporaryQueue. When the Server tries to send its next message, it should get an InvalidDestinationException. So it can stop sending messages to this queue. But this appears not to work with JBoss. (I am still using 2.2.1, but 2.4.x seems to behave the same.)
Is this a JBoss bug? Or is my expectation nonsense and not justified by the JMS spec? Then, how else can I detect a crashed client?
I am certainly not the only one with this kind of problem. So there should be a simpler solution than this brute-force approach: The client regularly tells the server that it is still alive and the server stops notifying the client when it has not heard from the client for some time.
Thanks for any help,
I do think it work in 3.0