Package com.ibm.websphere.scheduler
The scheduler adds a persistent, transactional timer service to J2EE applications.
See: Description
-
Interface Summary Interface Description 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 Scheduler is the central interface 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 Class Description TaskNotificationInfo The notification information sent to a NotificationSink bean. -
Exception Summary Exception Description 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
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