I have a java app running on JBoss on production and I need a page that will inform me via email if my app goes down; the new page has to run on a different server from the one on production. Can anybody point me to the right way to go about accomplishing this? If there any available codes that could be useful; I would so much appreciate such.
JMX is the industry standard for management of devices and applications JBoss provides its own implementation of Standard MBean helper, all you need to do is write your own MBean with your custom monitoring code which extends ServiceMBeanSupport and an interface with public getter & setter methods for attributes and public methods for operations you want to expose on the jmx-console.
Hi Dale, Thanks for your input; the point is I do not know what to do here, I think the wording should be a page that queries the app every couple of mins to know if Jboss is down and if it is, it should either try to restart JBoss or send out an email. I do not know how to, I need advice on a better way to do this.
I wouldn't make it J2EE. I'd just go to sourceforge and get the HttpClient jar file, and code a little Java app that requests a page from my JBoss server. If it throws an exception, times-out, or anything bad, send an email. Whatever the case, go to sleep for X minutes then loop back and do it all again. Then you'll get to work in the morning after JBoss crashes and you'll have a mailbox full of errors!
Now, if you want to make it hands-off, you would start your Java program as a service (there are several tools that allow you to start a Java app as a service). That way, you can set it to automatic start and you won't need to worry about making sure it gets started each time the machine comes-up.
Of course, I found a very beautiful couch. Definitely. And this tiny ad: