RE: Running a heartbeat program in struts.

2003-02-02 Thread Robert Taylor
Looks pretty cool! Thanks for sharing.

robert

 -Original Message-
 From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, February 02, 2003 12:16 AM
 To: Struts Users Mailing List
 Subject: RE: Running a heartbeat program in struts.


 This is the BEST open source cron like timer that I have seen. It is very
 robust and extendable. I have used it in several webapps (in a virtual
 hosting environment running several webapps) doing exactly what you are
 doing. Check this link out. I think it will provide you with what
 you need.

 http://www.part.net/quartz.html

 Brandon Goodin
 Phase Web and Multimedia
 P (406) 862-2245
 F (406) 862-0354
 [EMAIL PROTECTED]
 http://www.phase.ws


 -Original Message-
 From: Ron Day [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, February 01, 2003 11:38 PM
 To: Struts Users Mailing List
 Subject: RE: Running a heartbeat program in struts.


 Thanks for tip.

 R

 -Original Message-
 From: Robert Taylor [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, February 01, 2003 6:03 PM
 To: Struts Users Mailing List
 Subject: RE: Running a heartbeat program in struts.


 Take a look at java.util.Timer and java.util.TimerTask.
 More specifically Timer.scheduleAtFixedRate().

 It will greatly simplify your background process.

 robert

  -Original Message-
  From: Ron Day [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, February 02, 2003 12:47 AM
  To: Struts Users Mailing List
  Subject: Running a heartbeat program in struts.
 
 
  I am planning on putting a small heartbeat program as part of my Struts
  application. The heartbeat program will request HTTP headers from an
  external web server every 5 minutes or so, and if the response is not a
  200,will send email to 3 people.
 
  I plan on using a java class that starts a thread in the init
  method of the
  controller servlet. This thread will sleep for 5 minutes between sending
  requests to the external web server. It in turn will call a custom
  mail-sending class if the response is not 200.
 
  First, does anyone have any code like this, before I start coding,
  Second, any comments on my approach,
  Third, is there a better way (in Java of course).
 
  Thanks for any comments you have
 
  Ron
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Running a heartbeat program in struts.

2003-02-01 Thread Dan Tran
Keep this in mind.  What do you do if the http connection is down for longer
than 5,10,15 minutes?  Receiving lots of email with the same message can be
very anoying.

-D

- Original Message -
From: Ron Day [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Saturday, February 01, 2003 9:46 PM
Subject: Running a heartbeat program in struts.


 I am planning on putting a small heartbeat program as part of my Struts
 application. The heartbeat program will request HTTP headers from an
 external web server every 5 minutes or so, and if the response is not a
 200,will send email to 3 people.

 I plan on using a java class that starts a thread in the init method of
the
 controller servlet. This thread will sleep for 5 minutes between sending
 requests to the external web server. It in turn will call a custom
 mail-sending class if the response is not 200.

 First, does anyone have any code like this, before I start coding,
 Second, any comments on my approach,
 Third, is there a better way (in Java of course).

 Thanks for any comments you have

 Ron



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Running a heartbeat program in struts.

2003-02-01 Thread Robert Taylor
Take a look at java.util.Timer and java.util.TimerTask.
More specifically Timer.scheduleAtFixedRate().

It will greatly simplify your background process.

robert

 -Original Message-
 From: Ron Day [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, February 02, 2003 12:47 AM
 To: Struts Users Mailing List
 Subject: Running a heartbeat program in struts.
 
 
 I am planning on putting a small heartbeat program as part of my Struts
 application. The heartbeat program will request HTTP headers from an
 external web server every 5 minutes or so, and if the response is not a
 200,will send email to 3 people.
 
 I plan on using a java class that starts a thread in the init 
 method of the
 controller servlet. This thread will sleep for 5 minutes between sending
 requests to the external web server. It in turn will call a custom
 mail-sending class if the response is not 200.
 
 First, does anyone have any code like this, before I start coding,
 Second, any comments on my approach,
 Third, is there a better way (in Java of course).
 
 Thanks for any comments you have
 
 Ron
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Running a heartbeat program in struts.

2003-02-01 Thread David Graham
Why do you need Struts to do this?

David







From: Ron Day [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Running a heartbeat program in struts.
Date: Sat, 1 Feb 2003 23:46:58 -0600

I am planning on putting a small heartbeat program as part of my Struts
application. The heartbeat program will request HTTP headers from an
external web server every 5 minutes or so, and if the response is not a
200,will send email to 3 people.

I plan on using a java class that starts a thread in the init method of the
controller servlet. This thread will sleep for 5 minutes between sending
requests to the external web server. It in turn will call a custom
mail-sending class if the response is not 200.

First, does anyone have any code like this, before I start coding,
Second, any comments on my approach,
Third, is there a better way (in Java of course).

Thanks for any comments you have

Ron



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Running a heartbeat program in struts.

2003-02-01 Thread Ron Day
I don't, I have a big Struts application already that needs to use this
functionalitiy.



-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 01, 2003 6:14 PM
To: [EMAIL PROTECTED]
Subject: Re: Running a heartbeat program in struts.


Why do you need Struts to do this?

David






From: Ron Day [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Running a heartbeat program in struts.
Date: Sat, 1 Feb 2003 23:46:58 -0600

I am planning on putting a small heartbeat program as part of my Struts
application. The heartbeat program will request HTTP headers from an
external web server every 5 minutes or so, and if the response is not a
200,will send email to 3 people.

I plan on using a java class that starts a thread in the init method of the
controller servlet. This thread will sleep for 5 minutes between sending
requests to the external web server. It in turn will call a custom
mail-sending class if the response is not 200.

First, does anyone have any code like this, before I start coding,
Second, any comments on my approach,
Third, is there a better way (in Java of course).

Thanks for any comments you have

Ron



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Running a heartbeat program in struts.

2003-02-01 Thread Ron Day
It will only send email once, and set a flag. Flag will be reset when http
connection comes up again.

But thanks for the comment.

R

-Original Message-
From: Dan Tran [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 01, 2003 6:00 PM
To: Struts Users Mailing List
Subject: Re: Running a heartbeat program in struts.


Keep this in mind.  What do you do if the http connection is down for longer
than 5,10,15 minutes?  Receiving lots of email with the same message can be
very anoying.

-D

- Original Message -
From: Ron Day [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Saturday, February 01, 2003 9:46 PM
Subject: Running a heartbeat program in struts.


 I am planning on putting a small heartbeat program as part of my Struts
 application. The heartbeat program will request HTTP headers from an
 external web server every 5 minutes or so, and if the response is not a
 200,will send email to 3 people.

 I plan on using a java class that starts a thread in the init method of
the
 controller servlet. This thread will sleep for 5 minutes between sending
 requests to the external web server. It in turn will call a custom
 mail-sending class if the response is not 200.

 First, does anyone have any code like this, before I start coding,
 Second, any comments on my approach,
 Third, is there a better way (in Java of course).

 Thanks for any comments you have

 Ron



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Running a heartbeat program in struts.

2003-02-01 Thread Ron Day
Thanks for tip.

R

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 01, 2003 6:03 PM
To: Struts Users Mailing List
Subject: RE: Running a heartbeat program in struts.


Take a look at java.util.Timer and java.util.TimerTask.
More specifically Timer.scheduleAtFixedRate().

It will greatly simplify your background process.

robert

 -Original Message-
 From: Ron Day [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, February 02, 2003 12:47 AM
 To: Struts Users Mailing List
 Subject: Running a heartbeat program in struts.
 
 
 I am planning on putting a small heartbeat program as part of my Struts
 application. The heartbeat program will request HTTP headers from an
 external web server every 5 minutes or so, and if the response is not a
 200,will send email to 3 people.
 
 I plan on using a java class that starts a thread in the init 
 method of the
 controller servlet. This thread will sleep for 5 minutes between sending
 requests to the external web server. It in turn will call a custom
 mail-sending class if the response is not 200.
 
 First, does anyone have any code like this, before I start coding,
 Second, any comments on my approach,
 Third, is there a better way (in Java of course).
 
 Thanks for any comments you have
 
 Ron
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Running a heartbeat program in struts.

2003-02-01 Thread Brandon Goodin
This is the BEST open source cron like timer that I have seen. It is very
robust and extendable. I have used it in several webapps (in a virtual
hosting environment running several webapps) doing exactly what you are
doing. Check this link out. I think it will provide you with what you need.

http://www.part.net/quartz.html

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Ron Day [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 01, 2003 11:38 PM
To: Struts Users Mailing List
Subject: RE: Running a heartbeat program in struts.


Thanks for tip.

R

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 01, 2003 6:03 PM
To: Struts Users Mailing List
Subject: RE: Running a heartbeat program in struts.


Take a look at java.util.Timer and java.util.TimerTask.
More specifically Timer.scheduleAtFixedRate().

It will greatly simplify your background process.

robert

 -Original Message-
 From: Ron Day [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, February 02, 2003 12:47 AM
 To: Struts Users Mailing List
 Subject: Running a heartbeat program in struts.


 I am planning on putting a small heartbeat program as part of my Struts
 application. The heartbeat program will request HTTP headers from an
 external web server every 5 minutes or so, and if the response is not a
 200,will send email to 3 people.

 I plan on using a java class that starts a thread in the init
 method of the
 controller servlet. This thread will sleep for 5 minutes between sending
 requests to the external web server. It in turn will call a custom
 mail-sending class if the response is not 200.

 First, does anyone have any code like this, before I start coding,
 Second, any comments on my approach,
 Third, is there a better way (in Java of course).

 Thanks for any comments you have

 Ron



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]