Your connection is broken, so your message listener is never going to receive another
message.
You need to reconnect to the server after the onException()
Try adding e.printStackTrace() to your onException() method so you can
see what is happening.
Regards,
Adrian
a
Oops.
I added e.printStackTrace in onException. It is never called (well, I only waited
about 1/2 hour).
And often the second sendMessage can't connect to queue/A and I get the following
output:
Starting JBoss...JBoss is up
Sending message...enqueued...received
Shutting down JBoss...JBoss is
It woun't get called if you close the connection.
at org.jboss.mq.Connection.close(Connection.java:468)
at JBossRebootExperiment2.safeClose(JBossRebootExperiment2.java:121)
at JBossRebootExperiment2.main(JBossRebootExperiment2.java:42)
Regards,
Adrian
a