Messaging server (like JbossMQ /SonicMQ) is hosted on one machine.
A JMS receiver (MDB/core java program) on another machine receives messages from the messaging server.
The JMS receiver is now continuously listening/reading messages from a certain queue of the server.
Now the messaging server has this receiver in its list of receivers for that particular queue.
For some reason the messaging server is down and then restarted.
The JMS connection of the receiver is now invalid.
When the messaging servers comes up again its list of receivers is empty.
Can you please help me on how the JMS receiver can detect the above scenario and re-establish the connetion to the messaging server, the next time the server is up.
When I create a message consumer or queue receiver in a j2se program, and take messages from JbossMQ I have some additional threads running on my JVM. These threads are not directly created by the program and servers only for receiving messages. One of these threads is catching an exception and printing a stack trace when it detects that the connection is lost. This will also result in the closing of JMS connection. The problem is that the exception is not thrown for the programmer to catch and handle it at some level. I also tried ExceptionListener and waited for ping interval. Please give me guidance, solutions and corrections.
For comments on this, Thanks in advance
Version? JBoss 3.2.X should automatically detect and reconnect your MDB.