Introduction
Terminology
Documentation
Sample Applications
The OracleAS Job Scheduler is a new component that will be generally available in the upcoming 10.0.3 release. The Scheduler provides asynchronous scheduling services for J2EE applications. Some key features are:
- API for submitting, controlling, and monitoring jobs
- API-level JTA support for job submission and control
- Temporal- and trigger-based job execution
- Automatic retry of failed jobs
- Job blackout windows
- JMX monitoring and administration
- Auditing and logging
The Scheduler introduces some new and unique programming concepts. This section describes these new concepts in brief detail.
A job is defined as a unit of work that executes when the work is performed. For every job there is an associated trigger which, when evaluated, may result in the execution of the job. A job is implemented using a Java class. As part of a jobs implementation it is required to comply with the job contract, a system supplied Java interface that is implemented by all jobs submitted to the scheduler. This contract specifies a programmatic interface that is used by the Scheduler to execute the job.
A trigger describes a condition that, when evaluated, can cause the associated job to execute. The condition is described using a logical expression where the operands are notification assertions. Notifications are generated either (a) programatically by an application component (EJB, JSP, or servlet) or (b) as a result of a schedule expiration. Notifications may either be sent to a specific trigger or to a specified set of triggers.
A job may be optionally accompanied by a schedule. A schedule specifies when and how often a timer expiration notification is sent to the associated job trigger. The ‘when’ of a schedule is expressed as the expiration and the ‘how often’ is expressed as the interval. A schedule instance can be categorized as either single-action (non-repeating) or repeating. For a repeating schedule the interval of execution may be fixed (e.g. every ten minutes) or variable (on the first of every month).
The scheduler is a stateless session EJB that provides a set of APIs whereby jobs may be submitted and administered and, most importantly, provides a facility for the autonomous execution of jobs. Because the scheduler encapsulates the EJB 2.1 Timer Service it is effectively stateless. As such the execution of jobs occurs within the context of timeouts generated by this service.
The following documentation is available for download:
- Scheduler User's Guide - includes examples for building applications enabled with Scheduler technology
- Scheduler API javadoc - API documentation for the Scheduler and accompanying JMX MBeans
- Scheduler tag library reference - Documentation for the Scheduler tag library
The following sample applications are available for download:
Refer the README.txt file accompanying each of the samples for step-by-step instructions on extracting files, installing and running the applications successfully.
- eBay™ bid watcher - demonstrates how to write an application that monitors an eBay™ auction
- tag library samples - demonstrates how to use the Scheduler tag library with JSPs
eBay is a registered trademark of eBay inc.