|
Open source tools written in Java. Sponsored by Acelet corporation |
| |Home | Products | Documents | Downloads | Partners | Contact | |
SuperWatchdog Tutorial
Java EE (Java Enterprise Edition) is the new name for the Java platform. But J2EE (Java 2 Enterprise Edition) is still widely used. In this document J2EE and Java EE are interchangeable.
Welcome to SuperWatchdog!
SuperWatchdog is a full-featured J2EE event-action scheduler designed for scheduling all applications, include webservices and J2EE applications. When scheduled to run J2EE applications, it runs as a client of your J2EE application server. It is entirely written in Java. It is platform neutral and J2EE vendor neutral.
See SuperWatchdog Overview about general information.
SuperWatchdog runs J2EE tasks and webservice tasks by using the following technologies:
SuperWatchdog logs major events.
If you are not familiar with them, EasyEJB Tutorial and EasyWebservice are good places to start.
By the way, you can press the F1 key to access context sensitive help system from any window throughout the whole program.
Now, let's start our tutorial for SuperWatchdog.
1. Go to the main menu. Click on Module > SuperWatchdog > Watchdog Doer to open the Watchdog Doer Panel.
2. The Watchdog (Doer) Panel appears. This panel automatically refreshes itself promptly. The Refresh button is for your convenience only.

We get here by clicking the Watchdog Doer button. So the mode of SuperWatchdog is Doer. It shows on the title of the panel. To make our tutorial simple, we do not discuss Watchdog mode here.
Let's click on the Add button.
3. The Task Panel appears. Let's type "MyTask" (do not use space character) into the Name field and click on the Set Job button.
4. The Set Job Panel appears. Let's click on the Test job type and click the Ok button.
There is a side tour Set Job Tour introducing detail steps for setting jobs. You can take the side tour now and come back to this tutorial. Or take the side tour at the end of this tutorial. We will remind you.
5. Now, we come back to the Task Panel. We can see there is a brief information about the selected job on the Job field.
6. Let's click on the Set Trigger button to open the Set Trigger Panel.
Let us set the trigger. Type: File timestamp, Delay: 1, File Name: triggerFile:
Let's click on the Ok button to close this panel.
Note: If the file grows slowly, you need to teach SuperWatchdog how to detect the ripeness of the file. Ripeness criteria is for that. If in a period of time the file does not grow, we assume the file is mature. If a file is FTPed to a directory and it takes about 10 minutes to finish the job, you probably want to enter a little more than 600 seconds (10 minutes) here. For small files, any value would be good enough. So we just leave 5 second here and go ahead.
There is a side tour Set Trigger Tour introducing detail steps for setting triggers. You can take the side tour now and come back to this tutorial. Or take the side tour at the end of this tutorial. We will remind you.
7. Now we come back to the Task Panel again. We see that the Trigger field contains brief information about the trigger. That is what we have specified.
Do not forget to specify Alarm Email. If anything goes wrong with this task, a notification email will be send to this email address, such as task error or task exceeding expected duration.
Let's click on the Ok button.
8. Click Ok, we come back to the Watchdog Panel. Now, we have one line on the Organizer. That is the summary of our new added task.
On the Organizer: Because this is a new task, there is no content on the Last run time. If there is any change on the file triggerFile, the task will run.

On the Activity: It shows the brief information for each working task. Let us manually create a file named triggerFile under the current directory (Super Home - installed directory, default is AceletSuper). You will see that there is a new line shows the brief information for "MyTask".
9. Both the organizer and activity panels of the Watchdog Panel show dynamic information about all tasks. The information automatically refreshes itself promptly. You can also use the Refresh button manually refresh it.

10. You can see working task activity in graphic mode from the Chart Panel. Click the Chart tab on the Activity. It shows start time of all the executed tasks and gives you a whole picture about the working tasks. Put the mouse on a mark for a second, the related time will show on the chart as an information tip.

11. You can see task historical information from the History Panel, Go to the main menu > Module > SuperScheduler > History. You will see the Choose History Panel.
Check the Activity radio button and click on the Ok button. You will see a table view of task activity information

Highlight a line and click on the Detail button. The detail information about this item will show on the History Task Panel.

Check the Log radio button and click on the Ok button you will see a table view of task activity information from log records.

Highlight a line and click on the Detail button, the detail information about this item will show on the Log Task Panel.

You can see task historical information on the Trace Panel from SuperTracer as well.
12. All the SuperWatchdog related information is stored in the task database.
The default setup uses HypersonicSQL database. You can change it to your favorite database later.
Go to the main menu. Click Module > SuperWatchdog > Task Database. At this point, our watchdog window is still open, the task database is directly connected. So we will see the following information windows:
Then the Direct Task Database Connect Panel appears. If you want to modify this window, you need to close all watchdog windows. You'd better change the reserved word "localhost" to the real machine name to avoid confusing.
13. There is a side tour Set Job Tour introducing detail steps for setting jobs. There is also a side tour Set Trigger Tour introducing detail steps for setting triggers. If you have not take these tours, it is time to do so.
This is our SuperWatchdog tutorial. You can get more information from SuperWatchdog.