Package com.ibm.websphere.scheduler

Provides for a persistent transactional scheduled event capability for application which allows an application to periodically invoke a session bean or send a JMS message using a flexible pluggable calendar mechanism.

See:
          Description

Interface Summary
BeanTaskInfo Used to create a scheduled task which executes a TaskHandler bean.
MessageTaskInfo Used to create a scheduled task which sends a JMS message to either a Queue or Topic.
NotificationSink The remote interface for all NotificationSink stateless session beans.
NotificationSinkHome The home interface for all NotificationSink stateless session beans.
Scheduler The central object for managing and creating tasks.
TaskHandler The remote interface for all TaskHandler stateless session beans.
TaskHandlerHome The home interface for all TaskHandler stateless session beans.
TaskInfo Interface for all scheduled tasks.
TaskStatus The current state of a scheduled task.
UserCalendar The remote interface for all UserCalendar stateless session beans.
UserCalendarHome The home interface used for all UserCalendar beans.
 

Class Summary
TaskNotificationInfo The notification information sent to a NotificationSink bean.
 

Exception Summary
IllegalTaskState Invalid operation for current task state.
NotificationException A NotficationSink failed to fire.
NotificationSinkInvalid Invalid NotificationSink object detected.
SchedulerException A general Scheduler exception.
SchedulerNotAvailableException The persistent store is unavailable.
SchedulerRuntimeException A general unplanned Scheduler exception.
TaskInfoInvalid Exception thrown when a task interface used to create a TaskInfo object is not a registered type.
TaskInvalid The specified task identifier is not valid.
TaskPending A task update is pending.
UserCalendarException A general UserCalendar exception.
UserCalendarInvalid Invalid UserCalendar object detected.
UserCalendarPeriodInvalid The UserCalendar period value is incorrect.
UserCalendarSpecifierInvalid The UserCalendar specifier value is unknown.
 

Package com.ibm.websphere.scheduler Description

Provides for a persistent transactional scheduled event capability for application which allows an application to periodically invoke a session bean or send a JMS message using a flexible pluggable calendar mechanism.

Required jars

Applications that use these APIs must have the schedulerclient.jar on their classpath. This is located in the lib directory of a WAS-E 5.0 installation.

Scheduler

A scheduler allows an application to schedule a one shot or repeating task. This is done persistently and transactionally. We can provide exactly once semantics for the task. The task can be a call to a session bean or the sending of a JMS message to a queue or topic.

The interval for scheduling the task is specified using a calendar. See the calendar section below for more information on this. The start time and then repeating interval can be specified using a calendar string. The scheduler uses the provided calendar when calculating the next fire time of a task.

EJB Task

When a task is a session bean then the target session bean must use a specific home and remote interface. These cannot be extended and must be used as is. Once the session bean is called then it can call any business logic that it chooses. It is called inside a transaction provided by the scheduler. If it fails or rolls back then it will be rolled back and retried a short perion of time later.

JMS Task

A JMS message can be used also. The body and headers can be provided along with the queue connection factory or topic connection factory and queue/topic to use. This will be sent within the scheduler transaction.

Calendars

The scheduler needs to allow application to specify an time based interval for the tasks being executed. Rather than mandate a particular syntax and calendar implementation, it was decided instead to make the mechanism for these aspects pluggable. The UserCalendar interface are the interface to this function from the scheduler. A session bean that has a remote home or UserCalendarHome and a remote interface of UserCalendar can be used as a calendar bean. Applications can specify which calendar EJB to use on a task by task basis. These calendar EJBs should be clustered from a performance and availability point of view.