A manager which allows initializaton callabcks for a suite of related web apps to be registered and subsequently
run in a fixed order, irrespective of the order in which the application server initializes the web apps.
Sequencer maintains two lists of independently managed callbacks, one for the WSCOOR 1.0 web app suite and one
for the WSCOOR 1.1 web app suite. When registering a callback listeners or servlets for a given web app supply a
sequence id and a web app id to identify i) the required sequence and ii) the entry in the sequence at which the
callback should be stored. If a web app registers multiple callbacks they are stored in the sequence entry as a
list in registration order. Once a web app has registered all its callbacks it closes the relevant entry. When
all entries in a sequence have been closed the entries are traversed in order and the callbacks in each entry are
triggered, thus ensuring that callbacks for web apps with lower sequence indices complete before callbacks with
higher indices are called.
This version also includes a global latch which can be used to ensure that no callbacks are not processed until a
client lifts the latch. If the latch has already been lifted when the final element of a sequencer is closed the
callbacks are run straight away. If the latch is closed then the sequencer is installed in a deferred list. When
the latch is lifted the deferred list is scanned and callbacks are run for each sequencer found in the list.
Date: Nov 30, 2007
Time: 4:05:13 PM
public static final void close(int sequence,
notify end of callback registration for a web app associated with a given sequence
public static void unlatch()
undo the latch which initially delays running of any callback sequences. this is provided
to enable the Service start routine to configure any necessary parameters before the
listener callbacks are run.