MessageMonitor

public class MessageMonitor extends ActiveModule

The MessageMonitor is a monitor which correct all Creation Date: 14/05/2007

Author:Twinsen Tsang

Constructors

MessageMonitor

public MessageMonitor(String descriptorLocation, ClassLoader loader, boolean shouldInitialize)

Creates a new instance of MessageMonitor.

Parameters:
  • descriptorLocation – the module descriptor.
  • loader – the class loader for this module.
  • shouldInitialize – true if the module should be initialized.
Throws:
  • ModuleException – if errors encountered when loading the module descriptor.

Methods

execute

public boolean execute()

The method is invoked constantly with interval defined in the configuration descriptor or 60 second by default. It update the status of all timed-out message to PENDING so that they can be re-sending by Outbox Collector.

Returns:true if this method should be invoked again after a defined interval.

See also: hk.hku.cecid.ebms.spa.task.OutboxCollector, hk.hku.cecid.ebms.spa.task.OutboxTask

init

public void init()

Invoke for initialization.

initialize

public void initialize()

Post/Lazy initialization. This method is invoked at the firs time only this module execute. The purpose of this can guarantee the DAO Factory has been initialized successfully before creating it.