Re: How to schedule events on Tomcat

2010-12-03 Thread Jan Pernica
 Make servlet, start it at context start (load on startup), run thread 
and control time :)


On 2.12.2010 22:08, Brian wrote:

Wht I want to do is to call a method inside an object in the same java web app. 
Trying to do that from the OS would not be a good solution for me.



-Original Message-
From: Joseph Morgan [mailto:joseph.mor...@ignitesales.com]
Sent: Thursday, December 02, 2010 03:17 PM
To: Tomcat Users List; bbprefix-tom...@yahoo.com
Subject: RE: How to schedule events on Tomcat?

Why can't you use process scheduling of your OS?

-Original Message-
From: Brian [mailto:bbprefix-tom...@yahoo.com]
Sent: Thursday, December 02, 2010 1:52 PM
To: users@tomcat.apache.org
Subject: How to schedule events on Tomcat?

Hi,

I have a regular app in my Tomcat server, based on the request/response
paradigm.

I need some processes tu run at some specific intervals, lets say after 30
minutes of some events, or maybe every 30 minutes. Is there a way to do that
on Tomcat, to schedule events?

I don't want to try tying this process to the requests, because it would make
them run slower, and it would run twice at the same time if two requests
arrive almous simultaneously.



Thanks,



Brian






--
Děkuji a s pozdravem

Jan Pernica
===
Pernica IT Solutions
Masarykovo náměstí 8
664 51 Šlapanice
Czech Republic
tel,fax: +420 544 245 068
mobile: +420 777 634 665
mailto:jan.pern...@pernica.org
http://www.pernica.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: How to schedule events on Tomcat?

2010-12-02 Thread Joseph Morgan
Why can't you use process scheduling of your OS?

-Original Message-
From: Brian [mailto:bbprefix-tom...@yahoo.com] 
Sent: Thursday, December 02, 2010 1:52 PM
To: users@tomcat.apache.org
Subject: How to schedule events on Tomcat?

Hi,
 
I have a regular app in my Tomcat server, based on the request/response 
paradigm. 
 
I need some processes tu run at some specific intervals, lets say after 30 
minutes of some events, or maybe every 30 minutes. Is there a way to do that on 
Tomcat, to schedule events?
 
I don't want to try tying this process to the requests, because it would make 
them run slower, and it would run twice at the same time if two requests arrive 
almous simultaneously.
 
 
 
Thanks,
 
 
 
Brian
 
 
 
 

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to schedule events on Tomcat

2010-12-02 Thread Mark Thomas
On 02/12/2010 21:08, Brian wrote:
 Wht I want to do is to call a method inside an object in the same java web 
 app. Trying to do that from the OS would not be a good solution for me.

java.util.Timer and friends combined with a ServletContextListener

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to schedule events on Tomcat?

2010-12-02 Thread David kerber

On 12/2/2010 3:17 PM, Joseph Morgan wrote:

Why can't you use process scheduling of your OS?

-Original Message-
From: Brian [mailto:bbprefix-tom...@yahoo.com]
Sent: Thursday, December 02, 2010 1:52 PM
To: users@tomcat.apache.org
Subject: How to schedule events on Tomcat?

Hi,

I have a regular app in my Tomcat server, based on the request/response 
paradigm.

I need some processes tu run at some specific intervals, lets say after 30 
minutes of some events, or maybe every 30 minutes. Is there a way to do that on 
Tomcat, to schedule events?

I don't want to try tying this process to the requests, because it would make 
them run slower, and it would run twice at the same time if two requests arrive 
almous simultaneously.


I use java.util.Timer and java.util.TimerTask for this.

D

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: How to schedule events on Tomcat

2010-12-02 Thread Brian
Mark,

This is what I call a perfect solution. I already did it using your advice.
Thanks!

 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org]
 Sent: Thursday, December 02, 2010 04:13 PM
 To: Tomcat Users List
 Subject: Re: How to schedule events on Tomcat
 
 On 02/12/2010 21:08, Brian wrote:
  Wht I want to do is to call a method inside an object in the same java
web
 app. Trying to do that from the OS would not be a good solution for me.
 
 java.util.Timer and friends combined with a ServletContextListener
 
 Mark
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: How to schedule events on Tomcat?

2010-12-02 Thread Brian
Thanks!

 -Original Message-
 From: David kerber [mailto:dcker...@verizon.net]
 Sent: Thursday, December 02, 2010 05:05 PM
 To: Tomcat Users List
 Subject: Re: How to schedule events on Tomcat?
 
 On 12/2/2010 3:17 PM, Joseph Morgan wrote:
  Why can't you use process scheduling of your OS?
 
  -Original Message-
  From: Brian [mailto:bbprefix-tom...@yahoo.com]
  Sent: Thursday, December 02, 2010 1:52 PM
  To: users@tomcat.apache.org
  Subject: How to schedule events on Tomcat?
 
  Hi,
 
  I have a regular app in my Tomcat server, based on the request/response
 paradigm.
 
  I need some processes tu run at some specific intervals, lets say after
30
 minutes of some events, or maybe every 30 minutes. Is there a way to do
that
 on Tomcat, to schedule events?
 
  I don't want to try tying this process to the requests, because it would
make
 them run slower, and it would run twice at the same time if two requests
 arrive almous simultaneously.
 
 I use java.util.Timer and java.util.TimerTask for this.
 
 D
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org