You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Filip Defoort <fi...@cirquedigital.com> on 2003/10/24 05:09:33 UTC

[merlin] Composite.getProviders()

Hi,

Can someone shed some light on what Composite.getProviders() is supposed
to be doing and how a Provider differs from an Appliance ?

I'm hoping that it is a function that will give me all the 
implementations (Appliances,
Providers?) of a specific Service. If you have very good memory, you may 
remember
that I asked questions about this kind of functionality in Fortress long 
time ago: basically
in my case one Service has many implementations that all run in parallel 
and
the user can switch between different "sets" of these implementation.
E.g. if I have implementations 1,2,3,4,5,6 for service A, one set could be
implementations 1,2,3; another set implementations 1,4,5,6 and so on
(basically I need to turn implementations on and off)

In Fortress I solved this by implementing a custom Container that got 
passed into
its configuration the different components and some info about the different
sets of providers.

Trying to find what the cleanest way is to port all this code over to 
Merlin :-)

Thanks a lot!
- Filip


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


Re: [merlin] Composite.getProviders()

Posted by Stephen McConnell <mc...@apache.org>.

Filip Defoort wrote:

> Hi,
>
> Can someone shed some light on what Composite.getProviders() is supposed
> to be doing and how a Provider differs from an Appliance ? 


The Composition.getProviders() operation returns the set of appliance 
instances needed by the target appliance to handle deployment and 
runtime dependencies. For example - the set of appliances returned will 
include appliances supporting lifecycle stages, any custom stage 
strategies, and the appliences that will be used to support service 
dependencies.

I would strongly recommend that you do not depend on this operation as 
it is specifally there to support the DependencyGraph resolution of the 
assembly sequence.  I have in mind the idea of moving the 
DependencyGraph inside appliance as an inner class, negating the 
necessity to expose this method.

>
>
> I'm hoping that it is a function that will give me all the 
> implementations (Appliances,
> Providers?) of a specific Service. If you have very good memory, you 
> may remember
> that I asked questions about this kind of functionality in Fortress 
> long time ago: basically
> in my case one Service has many implementations that all run in 
> parallel and
> the user can switch between different "sets" of these implementation.
> E.g. if I have implementations 1,2,3,4,5,6 for service A, one set 
> could be
> implementations 1,2,3; another set implementations 1,4,5,6 and so on
> (basically I need to turn implementations on and off)
>
> In Fortress I solved this by implementing a custom Container that got 
> passed into
> its configuration the different components and some info about the 
> different
> sets of providers.
>
> Trying to find what the cleanest way is to port all this code over to 
> Merlin :-)


I imagine that you could do this using explicit provider directives in 
the block defintion.    This would let you different named components 
that are wired together in a specific way and then you resolve the 
service based on the appliance name.

Steve.

>
> Thanks a lot!
> - Filip
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org
>
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




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