JMS won't come up if the DB isn't available, true.
But you can use the start operation on the MBean to start the service that failed, likely the DestinationManager. You could write a service that could try to start the service every 10 seconds or something.
Thank you genman, but as I wrote, trying to start any services with MBeans under "jboss.mq" has no effect. I have to redeploy JMS or restart the server.
OK, now I got it: So I need to invoke
on both the PersistenceManager and the StateManager. Then everything is back to normal.
But wouldn't it be a lot easier if the JMS services could connect themselves automatically to the database when it becomes available? Why is the number of retry attempts limited in PersistenceManager.getConnection()?
Why is the number of retry attempts limited in PersistenceManager.getConnection()?
That code shouldn't even be there. It is only there to workaround
the stupid way that hypersonic starts.
Failure monitoring/recovery belongs in the mangement layer not the implementation.