I'm looking for a general solution to the following (I suppose rather common) problem:
Our system depends on a lot of services/ressources like the network/internet connectivity, sql database, other hosts, web services, file servers, JMS Queues etc. Obviously it is possible that one or more services is not available at some time, be it scheduled (maintenance/backup/reboot...) or unexpected (server crash...).
Whether a ressource is available or not can be determined by the application itself (e.g. when catching an IOException), a separate monitoring tool (e.g. nagios) or the administrator.
Some services depend on other services, e.g. a JMS queue (Resource "QUEUE) which can only be processed if a third-party Ressource ("HOST") host is available. This means that if the ressource "HOST" is marked as down, the resource "QUEUE" should be suspended until "HOST" is up again.
It is possible of course, to code such stuff manually, but it looks cumbersome, and since this is rather a general purpose problem, I'd expect a java standard to be out in the wild.
However, I cannot find such a thing. Any suggestions ? Is JMX the way to go ? Or some SNMP stuff ?