Open source tools written in Java. Sponsored by Acelet corporation
|Home | Products | Documents | Downloads | Partners | Contact |
SuperWatchdog

Table of Contents



Overview
 

SuperWatchdog is an event-action job scheduler for all application job scheduling, supporting J2EE tasks and Web service tasks. When it is scheduled for J2EE tasks, or set a J2EE trigger, it runs as a client of your J2EE application server. It runs in its own JVM and never interferes the state of your J2EE server.

SuperWatchdog is the twin software of SuperScheduler, which is timer-action job scheduler. This document specifies the differences between SuperScheduler and SuperWatchdog only. Please read SuperScheduler for more information.

In this document, the term trigger and event are interchangeable. The same is true for action and task.

Main Features

Watchdog mode

There are two Watchdog modes: Doer and Talker. It is similar to Scheduler Mode of SuperScheduler.

Task

A task is the action object with one target job and one trigger object. A task will be executed once by its triggered event.

Note: a Task of SuperScheduler is similar with a Task of SuperWatchdog. But they are different: the scheduled terms are different. The scheduled term of SuperScheduler is by timing, while the scheduled term of SuperWatchdog is by event.

The status of the task is about the nature of the task. A task can have the following statuses: 

A task will never be run if its status is not Standby. Non-active tasks can still be run manually. Non-active tasks may be run programmatically or as a member of a composite or retry job.

Working Task

A working task is a mirror version of the original task for one execution only. A working task is created and maintained during the execution of a task. 

The status of the working task is about the execution of the task. A working task have the following statuses:

Trigger

The trigger is the event object which starts the task.

The Effective period allows you to set an active period: From and To for a task. 

The format of summary information about trigger is:

    TriggerObject; delay; Start-Period; End-Period

Some parts of them may be empty if they are not defined.

Period

The period is the effective period for a task: A task will not be triggered out of its period.

Suspend task

A task can be suspended and un-suspend at any time you want. A suspended task will never be triggered. A suspended task can be manually run immediately.

Reactivate task

If the status of a task is Suspended or Error, it can be reactivated by re-save it. Or click the Activate button on the SuperScheduler panel.

A reactivated task will consume all existing trigger conditions. In other words, the existing trigger conditions will not trigger the task at its reactivation time. For example, if the trigger is a JMS Queue, at the reactivation time, all messages in the queue will be consumed immediately. The next qualified queue will trigger the task.

Task database

Task database is the database which stores task information. It is similar with the task database of SuperScheduler. Please see Task database of SuperScheduler for more information.

Existing conditions

At the time a trigger is constructed, there may be some existing conditions which may trigger new added tasks immediately. SuperWatchdog automatically consume these existing conditions, so a new added or activated task will be triggered by upcoming conditions only.

But the existing conditions of the following types of trigger will not be consumed at the time a new trigger is constructed:

Command line executer (the daemon)

You can run the Watchdog executer as a command line program (the daemon) under <Super Home>, the default directory is AceletSuper. You need to run run.bat (Windows) or run.sh (Unix) scripts. These scripts set required environment variables for using some jar files.

You can do either of the followings:

On Unix:

     > cd AceletSuper
     > sh runSuperWatchdoggingDaemon.sh

On Windows:

     > cd AceletSuper
     > runSuperWatchdoggingDaemon.bat

To run SuperWatchdog command line executor (daemon) you still need a full installation of Super. When the command line executor starts, it uses parameters stored in properties files to connect to server and databases. The files and property values are:

 super.properties, for application server connection: 
serverLoginName
serverPassword
 beanbox/scheduler.properties, for task database connection:
taskDatabaseUserName
taskDatabasePassword

Note: SuperWatchdog and SuperScheduler share the same task database.

These parameters are stored as plain text. If you have security concerns, do not save them. When the command line executor starts, it tries to connect to the database. If the connection fail, it will prompt message and ask you to key in user names and passwords. See ../scheduler/SuperScheduler.html#Security for more information.

To shutdown the command line executor, you need to use facilities from the operating system, such as Control-c, kill (Unix) or Task Manager (Windows). See ../scheduler/SuperScheduler.html#Graceful and forceful shutdown for related information.

User defined trigger

User defined triggers must implement com.acelet.s.watchdog.Triggering.

See ExampleUserTriggering as an example.

 

Register MBean notification when the MBean does not exist

You may in a situation when you want start an MBean triggered task when the MBean does not exist or has been stopped. This issue has not be addressed by JMX specification. SuperWatchdog uses vender specific feature to make the registration of future-able, so the registration of a trigger of MBean notification will not generate error. When the MBean is up and running, the trigger is working. This feature is supported for following application servers:

 


   © Copyright 1999-2008 Acelet Corporation. All rights reserved.