Enabling Tracked Item Overdue and Late Detection

Transaction Server provides a tracking monitor that detects when trackable items for the other components become overdue. The tracking monitor does not run by default, it must be enabled using the Transaction Server scheduler.

In an environment where several Transaction Server instances are configured to use the same database instance, each Transaction Server instance can run a tracking monitor. All of the tracking monitors cooperate with each other to ensure that all overdue items are detected once and only once. When any Transaction Server is taken offline, the remaining Transaction Server tracking monitors perform all of the overdue tracking.

The tracking monitor task allows the user to configure the number of overdue or late items that its tracking monitor handles at a single invocation. In an environment with multiple Transaction Server instances, the user should use a small value, such as one to five, for the number of items handled by a single tracking monitor. This lot size value does not limit overdue trackable detection but is used to control how the trackable items are distributed to the available tracking monitors. Setting this value too high results in an uneven distribution of the overdue items between the tracking monitors in a multiple Transaction Server environment.

To help improve the performance of the tracking monitors vary the start time of the tracking monitor task in each Transaction Server configuration. For example, three Transaction Server instances are configured to run the tracking monitor to run every minute. Schedule one to start on the minute, the next to start 20 seconds after the minute, and the last to run at 40 seconds after the minute. Refer to Configuring the Scheduler for more information about scheduling recurring tasks.

The scheduler task class name for the tracking monitor is com.ibm.icpcs.transactionserver.scheduler.TrackingMonitor.

Table 1 shows the parameters for this task.
Table 1. Tracking Monitor Parameters
Parameter Required Default Description
lotSize No 0 Specifies the maximum number of overdue trackable items that a tracking monitor attempts to process each time it executes. Use this parameter to evenly distribute the trackable items between all of the tracking monitors defined. When this value is set to zero, the tracking monitor attempts to process all of the available overdue trackable items. This parameter is an integer value and negative values are ignored.
This scheduled task is configured the same way as other repeating scheduled tasks are configured. The following Scheduler.xml sample shows a typical implementation:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE SCHEDULER SYSTEM "Scheduler.dtd">
<SCHEDULER>
     .
     .
     .
   <TASK background="yes">
      <NAME>Tracking Monitor</NAME>
      <INFO>Track item overdue - late detection</INFO>
      <EXEC>com.ibm.icpcs.transactionserver.scheduler.TrackingMonitor</EXEC>
      <PARAMETER name="lotSize">2</PARAMETER>
      <TIMER type="repeating">
         <INTERVAL>1 min</INTERVAL>
         <STARTING>01/05/14 12:00:20 am</STARTING>
      </TIMER>
   </TASK>
     .
     .
     .
</SCHEDULER>

This tracking monitor example uses a scheduled tracking interval of one minute. This means that the Transaction Server checks the TRACKABLE table every minute to see if any tracked items have become overdue or late. The user may modify this sampling frequency. Using a very short sampling frequency causes frequent database access, which can deteriorate Transaction Server performance. Using a sampling frequency that is too long increases the latency for detecting item overdue or late status.

In the example, the STARTING value is set to start at 20 seconds after the minute on a date that is in the past. This establishes a fixed point in time for the monitor cycle to reference. The tracking monitor sampling is done based on that fixed point in time. Use this method to vary the execution start time of all of the tracking monitors configured for the different Transaction Server instances in the environment. This results in sampling occurring more often and in better performance.

Notification

When the monitor detects overdue or late trackable items, the following notification methods can be used:
Transaction Server event
To use the JMS messaging service to transmit trackable overdue alerts to target applications, configure the trackable overdue event handler in the Transaction Server scheduler XML. Refer to TrackableOverdueEventHandler for more information about this event handler. This event handler may be set up to perform user-specific processing of the overdue or late items as they are detected. Refer to the Transaction Server Programming Reference for more information about implementing event handlers.
Email alert messages
The user can send overdue or late alert messages to a single list of email addresses for all of the items, or to specific email addresses based on the tracked item. To use the single email list option, a standard email address list must be set up in the Transaction Server configuration using the emailAddressList property. The smtpServer and smtpPort properties must also be configured to enable this option.