You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jeremy Boynes <je...@coredevelopers.net> on 2003/08/14 18:34:01 UTC
Timer Service
Please review the spec in detail - the EJB Timer Service has requirements
for persistent timers and IIRC notifications for events that happened when
the server was down.
It may not be overkill...
--
Jeremy
> On Thursday, August 14, 2003, at 05:50 pm, Aaron Mulder wrote:
>
> > When I used Quartz before, it was pretty heavyweight, in that you
> > had to create like 8 DB tables.
>
> Though we could embed Axion inside Geronimo (a pure Java JDBC driver)
> so having 8 database tables is no big deal. With enterprise schedulers
> you often want persistence of some kind...
>
> http://axion.tigris.org/
>
> (FWIW there's been talk of Axion moving to Apache also as part of
> db.apache.org)
>
>
> > I don't think we want to require that in
> > order to use the EJB service. Hopefully Quartz has some non-DB options
> > for storing its configuration?
>
> Could have. Still Axion is pretty lightweight too. Probably of the same
> order as parsing & reading & writing XML config files .
>
>
> > But still, it seems to me that's way
> > overkill for the EJB timer service, which is pretty simple IIRC (wake
> > me
> > up in x ms, not scheduling for "2 AM on the first weekday of every
> > month
> > except holidays" or anything).
>
> There's no need to limit ourselves to the letter of the spec. Lets have
> a good integrated timer service that implements the spec and more. It
> doesn't seem that heavyweight to me - using persistence - and I'm sure
> we could use it for other management features too....
>
>
> > Another option is JCronTab (I think that's the right name), also
> > overkill, but less overkill.
>
> It looks like that uses a database too. Dunno if either of these
> solutions allow an alternative data source but it would surprise me if
> that were not possible - or at least a fairly simple patch. Couldn't
> see the licence after a quick look either.
>
> I've a slight bias for Quartz as there's at least one Apache person
> behind it and its been used on a few existing projects like Jelly &
> Werkflow. But heck - if someone wants to write a simple lightweight
> timer service implementation, thats cool too.
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>
Re: [ Timer Service ] Cron-like configuration
Posted by Berin Loritsch <bl...@apache.org>.
Richard Monson-Haefel wrote:
> Personally, I feel that the timer service API is far too limited. I wrote
> an article that discussed the use of cron like configuration ... I would
> like to know if we can offer this sort of thing as a non-standard option - I
> have a feeling if we do it, the next EJB JSR will adopt it.
>
> Here is a link to the article I wrote:
> http://www.theserverside.com/resources/article.jsp?l=MonsonHaefel-Column4
In avalon-components we have a scheduler service available. It can be adapted
for use in this project. IMO it would be better to adopt and enhance an
existing project than to start it up from scratch.
--
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin
Re: [ Timer Service ] Cron-like configuration
Posted by Richard Monson-Haefel <Ri...@Monson-Haefel.com>.
Sounds like an excellent solution. We should take a serious look at using
Avalon's scheduler system for the Timer Service. That would really make
things easier in terms of development.
On 8/15/03 6:14 AM, "Berin Loritsch" <bl...@apache.org> wrote:
> Michael Remijan wrote:
>
>> Does anyone know of a good java cron class?
>
> As I posted earlier:
>
> ${avalon-components}/scheduler-api
> ${avalon-components}/scheduler-impl
>
> Both of these projects (one requires the other) work quite well. Your
> cron jobs are identified by _name_, and you can have quite complex
> cron invocation patterns. You are not limited to the simple delay/
> repeat intervals in most Java cron classes (although it is available).
> You can schedule based on time of day, day of week, or even business
> level concepts like work weeks that account for holidays.
>
> The triggers are flexible and allow you to plug in any implementation
> you want without forcing you into the two provided versions.
--
Richard Monson-Haefel
Co-Founder\Developer, Apache Geronimo
Author of:
J2EE Web Services (AW 2003)
Enterprise JavaBeans, 4ed (O'Reilly 2004)
Java Message Service (O'Reilly 2000)
http://www.Monson-Haefel.com
Re: [ Timer Service ] Cron-like configuration
Posted by Berin Loritsch <bl...@apache.org>.
Michael Remijan wrote:
> Does anyone know of a good java cron class?
As I posted earlier:
${avalon-components}/scheduler-api
${avalon-components}/scheduler-impl
Both of these projects (one requires the other) work quite well. Your
cron jobs are identified by _name_, and you can have quite complex
cron invocation patterns. You are not limited to the simple delay/
repeat intervals in most Java cron classes (although it is available).
You can schedule based on time of day, day of week, or even business
level concepts like work weeks that account for holidays.
The triggers are flexible and allow you to plug in any implementation
you want without forcing you into the two provided versions.
--
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin
[ Timer Service ] Cron-like configuration
Posted by Richard Monson-Haefel <Ri...@Monson-Haefel.com>.
Personally, I feel that the timer service API is far too limited. I wrote
an article that discussed the use of cron like configuration ... I would
like to know if we can offer this sort of thing as a non-standard option - I
have a feeling if we do it, the next EJB JSR will adopt it.
Here is a link to the article I wrote:
http://www.theserverside.com/resources/article.jsp?l=MonsonHaefel-Column4
--
Richard Monson-Haefel
Co-Founder\Developer, Apache Geronimo
Author of:
J2EE Web Services (AW 2003)
Enterprise JavaBeans, 4ed (O'Reilly 2004)
Java Message Service (O'Reilly 2000)
http://www.Monson-Haefel.com
Re: Timer Service
Posted by Bill de hÓra <bi...@dehora.net>.
Aaron Mulder wrote:
> On Thu, 14 Aug 2003, Jeremy Boynes wrote:
>
>>Please review the spec in detail - the EJB Timer Service has requirements
>>for persistent timers and IIRC notifications for events that happened when
>>the server was down.
>
>
> True, but I think we could write something simple using a file for
> persistence and java.util.Timer if we wanted to meet the minimum
> requirements. There is no facility in the spec for cron-style scheduling
> -- the only scheduling options are millisecond offsets, IIRC. Granted, we
> could certainly integrate a fancier package and offer more "value added"
> features. I'm trying to say I don't think we *need* to go there unless we
> want to.
The only real downside to Timer it is the API. You have to cache a
ref to the TimerTask to cancel it later - you can't just ask the
Timer to cancel a task of a given name. You also can't pause or
alter the schedule a TimerTask, but that's just a matter of doing
cancel() and reschedule() against a cached ref. A Timer can be
wrapped with any extra functionality later and it would save you
writing the core scheduler from scratch. I wouldn't bother not using
java.util.Timer.
Bill de hÓra
Re: Timer Service
Posted by Aaron Mulder <am...@alumni.princeton.edu>.
On Thu, 14 Aug 2003, Jeremy Boynes wrote:
> Please review the spec in detail - the EJB Timer Service has requirements
> for persistent timers and IIRC notifications for events that happened when
> the server was down.
True, but I think we could write something simple using a file for
persistence and java.util.Timer if we wanted to meet the minimum
requirements. There is no facility in the spec for cron-style scheduling
-- the only scheduling options are millisecond offsets, IIRC. Granted, we
could certainly integrate a fancier package and offer more "value added"
features. I'm trying to say I don't think we *need* to go there unless we
want to.
Aaron