cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <coc...@leverageweb.com>
Subject Re: Mass update to components for Cocoon 2.2
Date Wed, 22 Oct 2003 22:54:50 GMT
Unico Hommes wrote:

> Berin Loritsch wrote:
> 
>>/**
>>  * This component depends on the following:
>>  *
>>  * @avalon.dependency type="Generator"
>>  * @avalon.dependency type="Transformer"
>>  * @avalon.dependency type="Serializer"
>>  */
>>public void service(ServiceManager manager) throws ServiceException
>>{
>>     manager.lookup(Generator.ROLE);
>>     manager.lookup(Transformer.ROLE);
>>     manager.lookup(Serializer.ROLE);
>>}
>>
>>This allows Fortress to guarantee a proper shutdown order for the
>>components,
>>and to guarantee that there are no circular dependencies.  The type
>>parameter
>>is a class name (interface in this case) that can be resolved against
> your
>>import statements.  The services your component uses should be
> declared in
>>the
>>imports by default anyway.  If not, and you are proxying for another
>>component
>>that does the actual lookup, then you will have to add the fully
> qualified
>>class name.
>>
> 
> 
> Ok, I am running into the following situation: Looking at
> components.modules.input.AbstractMetaModule it defines that it is
> Composable and assigns the component manager to a protected member
> variable. A subclass, ChainMetaModule, uses the component manager to
> lookup a dependency. This means ChainMetaModule should redefine the
> compose()/ (->service()) method in order to declare its dependencies.
>  
> So, in order to avoid this I'd like to put the dependency tags above at
> class declaration level instead of directly above the service() method.
> Can I do this?

And while you're at it can you confirm whether or not tags are inherited 
by subclasses?

Geoff


Mime
View raw message