Re: Call function periodically
Should you prefer using Java Concurrent, please have a look at what these guys did: http://code.google.com/p/parfait/ <http://code.google.com/p/parfait/>They succesfully merged *JSR-275*, the Units of Measure API with elements in java.util.concurrent, allowing a far greater flexibility with regards to TimeUnits than the plain JDK enum provides. Also great for conversion between units, e.g. Parfait uses it for Bit/sec or TB/h, etc. On Thu, Sep 2, 2010 at 11:20 AM, Werner Keil wrote: > You could also use Quartz. > > Werner > > > On Thu, Sep 2, 2010 at 11:18 AM, wrote: > >> > This has to be done independently of the activity of the users on the >> web application >> Whats not clear to me is if you will be updating a UI or not... unless you >> are, then why use JavaScript? Use IoC and >> java.util.concurrent.ScheduledExecutorService to create a scheduler service >> with a runnable to work as a background thread. >> >> Example here: >> >> http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledExecutorService.html >> >> Cheers, >> Peter >> >> - Original Message - >> From: "Mite" >> To: users@tapestry.apache.org >> Sent: Wednesday, 1 September, 2010 01:25:15 GMT +02:00 Athens, Beirut, >> Bucharest, Istanbul >> Subject: Call function periodically >> >> >> I need to have a function called every one minute from the moment the >> application is deployed on the server, that does some database row >> updates. >> This has to be done independently of the activity of the users on the web >> application. Even if there are no users using the application, this call >> has >> to be done. >> Is there any way of doing this in Tapestry5? >> >> Thank you >> -- >> View this message in context: >> http://tapestry.1045711.n5.nabble.com/Call-function-periodically-tp2798762p2798762.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >
Re: Call function periodically
You could also use Quartz. Werner On Thu, Sep 2, 2010 at 11:18 AM, wrote: > > This has to be done independently of the activity of the users on the web > application > Whats not clear to me is if you will be updating a UI or not... unless you > are, then why use JavaScript? Use IoC and > java.util.concurrent.ScheduledExecutorService to create a scheduler service > with a runnable to work as a background thread. > > Example here: > > http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledExecutorService.html > > Cheers, > Peter > > - Original Message - > From: "Mite" > To: users@tapestry.apache.org > Sent: Wednesday, 1 September, 2010 01:25:15 GMT +02:00 Athens, Beirut, > Bucharest, Istanbul > Subject: Call function periodically > > > I need to have a function called every one minute from the moment the > application is deployed on the server, that does some database row updates. > This has to be done independently of the activity of the users on the web > application. Even if there are no users using the application, this call > has > to be done. > Is there any way of doing this in Tapestry5? > > Thank you > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Call-function-periodically-tp2798762p2798762.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Call function periodically
> This has to be done independently of the activity of the users on the web > application Whats not clear to me is if you will be updating a UI or not... unless you are, then why use JavaScript? Use IoC and java.util.concurrent.ScheduledExecutorService to create a scheduler service with a runnable to work as a background thread. Example here: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledExecutorService.html Cheers, Peter - Original Message - From: "Mite" To: users@tapestry.apache.org Sent: Wednesday, 1 September, 2010 01:25:15 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Call function periodically I need to have a function called every one minute from the moment the application is deployed on the server, that does some database row updates. This has to be done independently of the activity of the users on the web application. Even if there are no users using the application, this call has to be done. Is there any way of doing this in Tapestry5? Thank you -- View this message in context: http://tapestry.1045711.n5.nabble.com/Call-function-periodically-tp2798762p2798762.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Call function periodically
Quartz is nice but if you need something simple to happen every minute just use plain Java: timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { // do something } } }, 0, 6L); Kalle On Tue, Aug 31, 2010 at 3:58 PM, Laurent Guerin wrote: > Hi, > > you should look at quartz integration provided by ChenilleKit : > http://www.chenillekit.org/chenillekit-quartz/index.html > > > 2010/9/1, Mite : >> >> I need to have a function called every one minute from the moment the >> application is deployed on the server, that does some database row updates. >> This has to be done independently of the activity of the users on the web >> application. Even if there are no users using the application, this call has >> to be done. >> Is there any way of doing this in Tapestry5? >> >> Thank you >> -- >> View this message in context: >> http://tapestry.1045711.n5.nabble.com/Call-function-periodically-tp2798762p2798762.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Call function periodically
Hi, you should look at quartz integration provided by ChenilleKit : http://www.chenillekit.org/chenillekit-quartz/index.html 2010/9/1, Mite : > > I need to have a function called every one minute from the moment the > application is deployed on the server, that does some database row updates. > This has to be done independently of the activity of the users on the web > application. Even if there are no users using the application, this call has > to be done. > Is there any way of doing this in Tapestry5? > > Thank you > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Call-function-periodically-tp2798762p2798762.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Call function periodically
I had good results with the PeriodicUpdate mixin described at http://blog.bolkey.com/2010/05/creating-a-news-feed-in-tapestry-5 On Tue, Aug 31, 2010 at 6:25 PM, Mite wrote: > > I need to have a function called every one minute from the moment the > application is deployed on the server, that does some database row updates. > This has to be done independently of the activity of the users on the web > application. Even if there are no users using the application, this call > has > to be done. > Is there any way of doing this in Tapestry5? > > Thank you > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Call-function-periodically-tp2798762p2798762.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Call function periodically
I need to have a function called every one minute from the moment the application is deployed on the server, that does some database row updates. This has to be done independently of the activity of the users on the web application. Even if there are no users using the application, this call has to be done. Is there any way of doing this in Tapestry5? Thank you -- View this message in context: http://tapestry.1045711.n5.nabble.com/Call-function-periodically-tp2798762p2798762.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org