Subsystem monitors

 

+

Search Tips   |   Advanced Search

 

A subsystem monitor is an object that monitors the health of a remote system. It uses an event source to inform all registered listeners of the health of the system.

Advanced J2EE applications often rely on remote, non-managed, non-J2EE systems. These remote systems can periodically send clients a message to indicate that they are working. A subsystem monitor is a set of alarms that tracks indicator messages or heart beats from a remote system.

An application creates a subsystem monitor by calling the SubsystemMonitorManager.create() method with the following parameters:

Name

Each subsystem monitor must be uniquely named.

Heart beat interval

The time period, in milliseconds, between arriving heart beat messages.

Missed heart beats until stale or suspect

The number of heart beats that can be missed before the subsystem is marked as stale. This designation indicates that the subsystem might be having problems.

Missed heart beats until dead

The number of heart beats that can be missed before the system is considered down. The system then is marked as dead.

The subsystem monitor configures alarms to track the heart beat status. Whenever the ping() method is called, the alarms are reset. If an alarm fires, the ping() method has not been called; that is, the application did not receive a heart beat from the monitored subsystem. When the number of Missed heart beats until stale value has elapsed without a ping, a stale event is fired. Later, if the number of Missed heart beats until dead value elapses without a ping, a dead event is fired. If a ping is received after a stale or dead notification, a fresh event is sent, which indicates that the subsystem is alive again.

Make the Missed heart beats until dead value greater or equal to the Missed heart beats until stale value. If Missed heart beats until stale value equals the Missed heart beats until dead value, then a stale event is not published. Only a dead event is published.

We can register a listener that implements the SubsystemMonitorEvents interface for applications that require notification of events. For more information on the SybsystemMonitorEvents interface, see the Javadoc.

Heart beat messages can be transmitted using a variety of mechanisms. The application must call the SubsystemMonitor ping() method whenever a heart beat message arrives from a remote system, but the method used to detect these messages is up to the application. For example, you might use a JMS publish or subscribe implementation or even a third-party Java messaging product that does not implement JMS.


 

Related Tasks

Developing asynchronous scopes
Reference: Generated API documentation