avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: Extending ExcaliburTestCase
Date Tue, 30 Apr 2002 11:57:44 GMT
On Tue, 30 Apr 2002 16:53, Giacomo Pati wrote:
> So my proposal will be to extend the <context> part of the
> ExcaliburTestCase's configuration file by adding some attributes to it
> which will:
>   1. state what type of Context should be created (ie. type="block")
>   2. have specific attributes/elements for specific types (ie. for
> BlockContext populations like app-home, app-name, block-name, etc.)
> Please feel free to forward this to other lists (ie. -apps, -phoenix,
> etc.).
> What do you think about it?

I like it. 

I have actually been thinking about doing something similar because I want to 
transport services between myrmidon, cocoon, phoenix and another app I got at 
work. However each has a slightly different container. What I was thinking 
was adding xdoclet tags to the contextualize methods of the services to do 
things like

 * @av.context class=org.apache.avalon.phoenix.BlockContext
 * @av.context.entry key=mBeanServer class=javax.management.MBeanServer
 * @av.context.entry key=shared.classLoader class=java.lang.ClassLoader
 * @av.context.entry key=common.classLoader class=java.lang.ClassLoader
public void contextualize( final Context c )

This says that the component must have 3 entrys in context with specific keys 
and types, and it also saids that the context must be an instance of 

Of course at the moment the above would just be useful for documentation and 
automagically generating test scripts. However in the future I plan to add a 
section into BlockInfo descriptors that will actually verify that the above 
context is satisfied. (It will also allow blocks in phoenix to request other 
things like MBeanServer or services in myrmidon to access things like 
specific ClassLoaders).


Peter Donald

To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message