aspose file tools*
The moose likes Java in General and the fly likes PING service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "PING service" Watch "PING service" New topic
Author

PING service

Rajah Nagur
Ranch Hand

Joined: Nov 06, 2002
Posts: 239
There is an increasing need in my project to find out whether few of the portlets are available.

Background:

A portal page comprising of portlets. Some portlets get information from different sites(third party service providers) on the Internet. Portal server is Tibco on Weblogic.

Problem:

Most of the times when any one of these third party content providers are "down" or not accessible (network outage etc), then these portlets are shown as blank as there is no content. Portal clients are unhappy and raise tickets. So I want to develop a proactive PING Service which pings these third party services and alert the system admins asap, so that such issues can be resolved earliest.


Solution:
Most portlets get content by invoking third party Webservices, and some simple http calls.
I'm planning to use Apache HTTPComponents httpcore and develop some Java programs and schedule using cron.


Is there any better alternative option / opensource tools available ?


You can't wake a person who is <b><i>pretending</i></b> to be asleep.<br />Like what <b>"it"</b> does not like - <i> Gurdjieff </i>
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
I don't think PING is what you want - see the Wikipedia entry.
PING can not tell you if a service is available, only if the basic server can be contacted. Perhaps you need a more graceful method of displaying the problem - why not cache the previous portlet content with a datestamp - if you can't get the current content, show the old content with a warning that it is old.
That said, the simplest way to ping a network address would be to exec() your operating system's built in ping command.
Bill
Rajah Nagur
Ranch Hand

Joined: Nov 06, 2002
Posts: 239
I think I have found out a way to monitor services & network outage.

I'm planning to use Nagios.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
Please let us know how that turns out
Bill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: PING service