hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Lewis Ship <hls...@gmail.com>
Subject Re: Registry configuration integrity check
Date Mon, 03 Jan 2005 16:22:36 GMT
Somewhat difficult to accomplish.

One of the great and powerful things about HiveMind is that code (in
the form of services, or just plain objects) gets merged with data via
contributions.

Further, a good part of HiveMind is defined in HiveMind, such as
service implementation and interceptor factories, ObjectProviders,
translators, etc.

This makes validating that a configuration is correct problematic. 
It's like verifying that a program is correct.

Mostly, you're concerned with validating that the contributions follow
the schema.

We could certainly kludge together something equivalen to EarlyLoad,
but for configurations.  Simplying invoking List.size() on a
contribution should be enough to validate that the xml is valid.


On Sun, 2 Jan 2005 00:51:01 +0700, Jean-Francois Poilpret
<jfpoilpret@hcm.vnn.vn> wrote:
> Hi Albert,
> 
> Yes a JUnit test could help but it would not be generic, ie it would have to
> be adapted when ANY hivemind configuration file is changed.
> 
> My original idea was more about a generic way to check that all services can
> be built correctly, and get a report about any errors. Another important
> point here is to check every service even in case one of them throws an
> exception, so that all configuration errors can be fixed in one time.
> 
> Actually, I wonder if this should not be a method of
> Registry/RegistryBuilder, some method that would "simulate" a eager load of
> all services, then a special "ConfigCheckErrorHandler" could possibly do the
> trick for report generation.
> 
> Cheers,
> 
>         Jean-Francois
> 
> -----Original Message-----
> From: Albert Kwong [mailto:mandr_ua@yahoo.com]
> Sent: Saturday, January 01, 2005 3:44 PM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Registry configuration integrity check
> 
> Hi Jean,
> 
> How about a simple JUnit test that calls
> RegistryBuilder to construct a registry, and possibly
> call some services?  Would that be sufficient for your
> case?
> 
> Albert
> 
>  --- Jean-Francois Poilpret <jfpoilpret@hcm.vnn.vn>
> 內容:
> > Hello,
> >
> > My current experience with HiveMind (about 4 months
> > now) has shown me that
> > during development time, most errors during
> > debugging are due to
> > configuration problems.
> > We know that by default, at Registry building time,
> > HiveMind will just log
> > an error when there is a mistake in configuration.
> > This is a changeable
> > option: we may use the StrictErrorHandler to get
> > exceptions right at
> > Registry build time.
> >
> > However, this still requires us poor developers
> > (;-)) to deploy the full
> > application and run it to hit problems.
> >
> > I wondered if it would be possible to develop an ant
> > task that would do the
> > full check of the configuration and report _all_
> > encountered errors and
> > finally fail in case there is at least one.
> > In this case this would be much easier to produce
> > deployable applications
> > that will run smoothly at the first time.
> >
> > I also remarked that not all configuration is
> > checked at Registry build
> > time, HiveMind may report errors due to
> > configuration mistakes at the time a
> > service implementation is constructed, here again
> > this does not ease early
> > debugging of configuration problems during
> > integration. It would be good if
> > the ant task described above could as well force
> > early-load of all services
> > to check really the _complete_ configuration of the
> > application.
> >
> > I wondered if someone had already developed
> > something similar, or otherwise
> > how do you handle this kind of problem: is everybody
> > using the "painful" way
> > (deploy, test, fix, rebuild, redeploy and so on...)
> > like I do? Or are there
> > some better ways to ensure that your configuration
> > is correct?
> >
> > Does the idea of an ant task as I described (or even
> > an independent
> > application) make sense?
> >
> > NB: I am conscious that with more integration tests,
> > such errors can be more
> > easily found and fixed, but impatient people (like
> > me) sometimes prefer to
> > immediately give a run to the whole application ;-)
> >
> > Cheers,
> >
> >       Jean-Francois
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > hivemind-user-help@jakarta.apache.org
> >
> >
> 
> =====
> Are you an MBA?  Check out http://www.mba.hk for value added services.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Mime
View raw message