Win a copy of Functional Design and Architecture this week in the Functional programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Checking if JBoss is running

 
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Guys;

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.

Thanks,
Anselm.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Example at
http://wiki.jboss.org/wiki/Wiki.jsp?page=ExampleHelloWorldService

Forums at
http://www.jboss.org/index.html?module=bb&op=viewforum&f=63

Padma
 
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a bit confused why you would want a "page" to do this. If you run the page, and it says production is down, then why would you need an email?

I have a proggy that runs as a service that just hits a url. If it times-out, it sends me an email. That's just a matter of doing minimal setup using "HttpClient".

--Dale--
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Guys;

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.

Thanks guys
Anselm.
[ August 23, 2005: Message edited by: Anselm Paulinus ]
 
Dale Seng
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

--Dale--
 
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic