commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship" <>
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
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

The underlying belief behind your statement is that you can't determine if your hivemodule.xml
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
suite, rather than only at deployment time. What I would rather see is a set of best practices
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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message