Seam Cron
Scheduling and asynchronous invocation support for managed beans.
To get started in Maven, copy and paste the following XML fragment into the <dependencies> section of your pom.xml:
<dependency>
<groupId>org.jboss.seam.cron</groupId>
<artifactId>seam-cron-api</artifactId>
<version>3.0.0.Alpha1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam.cron</groupId>
<artifactId>seam-cron-scheduling-quartz</artifactId>
<version>3.0.0.Alpha1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam.cron</groupId>
<artifactId>seam-cron-asynchronous-quartz</artifactId>
<version>3.0.0.Alpha1</version>
<scope>runtime</scope>
</dependency>
|
Pete Royle |
Lead |
peteroyle |
Independent |
Brisbane, Australia (UTC+10) |
Dave Oxley |
Contributor |
daveoxley |
Workplace Systems |
Drouin, VIC, Australia (UTC+10/11) |
George Gastaldi |
Contributor |
gastaldi |
Independent |
Joinville, SC, Brazil (UTC-3) |
Cloves Almeida |
Contributor |
cjalmeida |
Independent |
Eniwetok, Kwajalein (UTC+12) |
Jason Porter |
Contributor |
lightguard |
Red Hat, Inc. |
Salt Lake City, UT, USA (UTC-7) |
Dan Allen |
Contributor |
mojavelinux |
Red Hat, Inc. |
Laurel, MD, USA (UTC-5) |
Want your name to appear in this list? Join us in #seam-dev on freenode and let us know you want to get involved.
The best way to run scheduled events in a JSR-299 environment. It makes use of CDI’s typesafe event model for tying business logic to schedules. That is, you define your schedules using the provided qualifiers, which you apply to observer methods containing the business logic that you wish to be run at those times.
| 3.0.0.Alpha1 |
~ Late Feburary |
|
 |
This section serves as a whiteboard for design and ideas for this module. Once you've decided to pursue a feature, it should be added to JIRA as a feature request and optionally linked from this page.
|
@Scheduled("00:00")
@Qualifier
@Retention( RUNTIME )
@Target( { PARAMETER })
public @interface AtMidnight
{
}
public void howlAtTheMoon(@Observes @AtMidnight CronEvent event) {
wolf.howl();
}
public void clockChimes(@Observes @Every(HOUR) Trigger t) {
int chimes = t.getValue() % 12;
if (chimes == 0) { chimes = 12; }
for (int i=0; i<chimes; i++) {
bellTower.getRope().pull();
}
}
@Asynchronous @Debit
public Balance addDebit(int dollars) {
...
return new Ballance();
}
public void reportNewBalance(@Observes Balance balance) {
log.report(balance.amount());
}
public void trackSpending(@Observes @Debit Balance balance) {
db.saveSomething();
}