users@glassfish.java.net

Re: Threadpool in Glassfish

From: Alexis Moussine-Pouchkine <alexis.moussine-pouchkine_at_oracle.com>
Date: Thu, 16 Jun 2011 14:16:29 +0200

You're probably looking for the EJB Timer Service and @Schedule.
Here's a simple example: http://www.adam-bien.com/roller/abien/entry/simplest_possible_ejb_3_16
-Alexis

On 16 juin 2011, at 13:00, forums_at_java.net wrote:

> Hi everybody.
>
> In our app, we have some cron tasks should run certain times. In our current
> implementation, whe have a timer thread containing cron task. This timer
> checks each cron against its time interval, if cron should be executed, timer
> submit this cron to ExecutorService.
>
>
>
> I wonder what the best strategy is to implement such a thing in a java ee
> environment(Glassfish)?
>
>
>
> I dont want to manage thread in my app, instead app server manage them
> instead of me.
>
>
>
> thank you.
>
>
> --
>
> [Message sent by forum member 'yavuzkavus']
>
> View Post: http://forums.java.net/node/812605
>
>