You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Albert Kwong <ma...@yahoo.com> on 2005/01/01 09:43:44 UTC

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 <jf...@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


Re: Registry configuration integrity check

Posted by Howard Lewis Ship <hl...@gmail.com>.
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
<jf...@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 <jf...@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


RE: Registry configuration integrity check

Posted by James Carman <ja...@carmanconsulting.com>.
Some services?  But, how would that be applicable to all situations?  How
would you know which services to "call"?  Also, for most service models,
obtaining the service reference would not be sufficient.  You would have to
call a method on the service in order for the core service implementation
object to be created. 

-----Original Message-----
From: Albert Kwong [mailto:mandr_ua@yahoo.com] 
Sent: Saturday, January 01, 2005 3:44 AM
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 <jf...@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


RE: Registry configuration integrity check

Posted by Jean-Francois Poilpret <jf...@hcm.vnn.vn>.
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 <jf...@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