Package com.ibm.websphere.scheduler

The scheduler adds a persistent, transactional timer service to J2EE applications.

See: Description

Package com.ibm.websphere.scheduler Description

The scheduler adds a persistent, transactional timer service to J2EE applications. It allows a server 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 scheduler-client.jar JAR in the Java classpath. This is located in the lib directory of the WebSphere Application Server.

Scheduler

A scheduler allows an application to schedule a single or repeating task. This is done persistently and transactionally using the Scheduler interface. Each task is guaranteed to run exactly once. The task can either call a stateless session bean or the send a JMS message to a queue or topic.

The time at which the task runs can be specified using a java.util.Date or a calendar interval. See the calendars section below for more information.

EJB Task

When a task calls a session bean using the BeanTaskInfo interface, the target session bean must use a specific home and remote interface (TaskHandler and TaskHandlerHome). These interfaces cannot be extended and must be used as-is. Once the session bean is called, 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 will automatically be retried until successful or cancelled.

JMS Task

When a task sends a JMS message using the MessageTaskInfo interface, 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 allows applications to specify a time based interval for the tasks to run. The scheduler provides a set of calendars in the SchedulerCalendars system application that all applications can use. Additional calendars can be created and are implemented as stateless session beans. Each bean must specify the UserCalendar remote interface and UserCalendarHome home interface. Once a bean is created and deployed, applications can specify which calendar EJB to use on a task by task basis. These calendar EJBs must be made available to each server that could potentially run the task.
Version:
1.1.0
IBM WebSphere Application ServerTM
Release 9.0