commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship" <hlshipli...@comcast.net>
Subject RE: [HiveMind] Force loading of Services
Date Wed, 24 Mar 2004 22:29:36 GMT

> particular service.  In a webapp environment, for example, 
> I'd want to do this
> in the contextInitialized() method of a 
> ServletContextListener, and never put
> the app into service if it has configuration problems.
> 

My approach has been to allow services to initialize as-needed, to copiously output errors
during
initialization, but then let the services stumble along afterwards in the wake of any initialization
errors. So you might see a BuilderFactory error about invalid values or attributes, then later
see a
NPE because a service implementation instance variable is not initialized (due to the invalid
value).

The underlying belief behind your statement is that you can't determine if your hivemodule.xml
is
valid until deployment time, therefore you want to do a lot of checking at deployment time.

The intent with HiveMind is that you should be able to do much of the testing inside a unit
test
suite, rather than only at deployment time. What I would rather see is a set of best practices
and
the evolution of the framework to ensure that this is the case.

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Tapestry: Java Web Components 
http://howardlewisship.com


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message