[seam-dev] Seam Cron API for scheduled .... things

Jason Porter lightguard.jp at gmail.com
Fri May 13 00:59:18 EDT 2011


Maybe a bit of a tangent, but have you thought of using JSR 310?

On Thu, May 12, 2011 at 18:53, Pete Royle <howardmoon at screamingcoder.com>wrote:

> Shane mentioned Task and Action, of which we both prefer Action.
>
> I also just thought of Trigger and Notification.
>
> Pete R
>
>
> George Gastaldi wrote:
> > I suggest adding a java.util.concurrent.TimeUnit attribute to @Every
> > annotation and stick to CronEvent naming standard.
> >
> > 2011/5/12 Pete Royle <howardmoon at screamingcoder.com>:
> >
> >> Hi All,
> >>
> >> Having trouble deciding on something. Originally observer methods for
> >> scheduled events were quite readable and intuitive, eg:
> >>
> >> public void doStuff(@Observes @Scheduled("10:00") Event e) { ... }
> >>
> >> However, due to possible confusion between
> org.jboss.seam.cron.events.Event
> >> and javax.enterprise.event.Event Event was renamed to CronEvent. This is
> >> fine, but I wonder if there's any better options. Viable options I've
> >> thought of so far include:
> >>
> >> @Observes @Scheduled("10:00") CronEvent ce
> >> @Observes @Scheduled("10:00") Instant i
> >> @Observes @Scheduled("10:00") Moment m
> >> @Observes @Scheduled("10:00") Tick t
> >> @Observes @Scheduled("10:00") Occurrence o
> >> @Observes @Scheduled("10:00") Appointment a
> >>
> >> Or maybe go for something different like:
> >>
> >> @Observes @At("10:00") Schedule s
> >> @Observes @Recurring("10:00") Schedule s
> >>
> >> I figured since this is going to be the most used part of the API I
> would
> >> throw it out there for discussion and to see if there are any better
> ideas
> >> out there.
> >>
> >> It's probably worth mentioining that another part of the API looks like
> >> this:
> >>
> >> @Observes @Every Second s
> >> @Observes @Every Minute m
> >> @Observes @Every Hour h
> >>
> >> Thanks for the feedback.
> >>
> >> Pete R
> >>
> >> _______________________________________________
> >> seam-dev mailing list
> >> seam-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/seam-dev
> >>
> >>
> >>
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
>



-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20110512/bc7503d6/attachment.html 


More information about the seam-dev mailing list