Paul Ferraro wrote:
1. If a user deletes mod_cluster.sar from their profile, jbossweb
will
refuse to start since it has a dependency on the ModClusterListener bean
- the configuration of which was just deleted. This is rather annoying.
Maybe this is a general MC question for smart Ales :-) If we have a
dependency on a non-existing bean, can't we just ignore that dependency
? For example, if we read in all the beans at MC startup time, construct
a dependency graph and see that the ModClusterListener bean doesn't
exist, can't we ignore that dependency ?
The other question I have for Paul, is why does jbossweb have a
dependency on ModClusterListener ? Can't ModClisterListener simply query
JBossWeb (if available) for deployed contexts (if that's why it
registered as a listener) and then register if needed ?
If we could remove this dependency, we'd have one less thing to worry
about (and configure)...
a. A potential workaround for this: move the mod_cluster jar and
configuration xml within the jbossweb service itself, rather than a
separate deploy/mod_cluster.sar. Those profiles that include jbossweb,
but do not want to include mod_cluster could include a "dummy"
ModClusterListener bean configuration - so the dependency is satisfied.
Hmm, not really nice though...
b. Hmm - now that I think of it we may actually be able to drop the
jbossweb dependency altogether...
YEEEAAAHHH !
The reason this dependency exists in
the first place is to ensure that mod_cluster sends the necessary
DISABLE-APP/STOP-APP/REMOVE-APP mcmp messages prior to shutdown of
jbossweb. In my fix for MODCLUSTER-131, mod_cluster's shutdown handling
was enhanced to react to the "jboss.tomcat.connectors.stopped" JMX
event, emitted prior to stopping the Connectors, which is the first
thing jbossweb does during shutdown. If I'm not mistaken, this may
ultimately mean that we can finally let mod_cluster depend on jbossweb,
and not the other way around.
That's how it should be (see my comment above) !
We still need mod_cluster to start before the WebServer
Why ? Can't we simply grab the deployed contexts from JBossWeb ? If
mod-cluster is started before jbossweb, we'll get the deployed contexts
later, once jbossweb has been started. Do we get notifications about
when beans have been started ? If so we could listen for
jbossweb-started, and *then* grab all contexts...
--
Bela Ban
Lead JGroups / Clustering Team
JBoss