Change the ping time.
Then register an ExceptionListener with the connection.
When the server fails to pong the onException
method will be invoked.
Thanks, I'll take a look at that.
It occurs to me that I may not have chosen the best architecture here,
Instead of connecting to JMS from the client I could just place my messages in a database and have an MBean check the table and generate JMS messages every 10 minutes or so, I currently do this only as a backup measure as I need the messages to be processed as soon as possible, and I didn't want to have this MBean activating and doing queries every second or so.
I was wondering whether an alternative might be to have the MBean sleep for 10 minutes at a time but also listen for UDP packets, then have the client send a packet whenever it adds a message to the table, if the UDP packet never gets through the next client's probably will and there is always the 10 minute timeout.
What do people think?