admin@glassfish.java.net

synchronous or asynchronous semantics of config changes

From: Lloyd L Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Fri, 19 Oct 2007 09:43:09 -0700

Here's another topic which was never explicitly addressed in any
version of AppServer--

Suppose an Attribute is changed. What does this mean? Here are some
possibilities:

1. After validating, the changed Attribute(s) are persisted to
disk. An AttributeChangeNotification is issued for each Attribute.
Barring NotificationListeners, nothing else happens; no runtime
behavior changes.

2. Same as (1), but code that depends on the configuration takes
action when it sees it change, but in an asynchronous manner; the
change in behavior based on the new configuration could *fail*,
leaving the configuration inconsistent with the actual runtime state.

3. Same as (1), but code that depends on the configuration takes
synchronous action simultaneous with the change. A failure means
that the change fails; it is not possible to alter the configuration
unless the runtime state represented by the configuration can be
achieved. The remote client must wait until the change occurs.

I think today's situation in GlassFish V2 corresponds to (2), and
possibly (3), at least in some cases. I'm not sure.

In some cases we have a "restart required" flag, which implies (2).


Lloyd