On Thu, 2003-02-20 at 06:18, Peter Donald wrote:
> Hi,
> 
> On Thu, 20 Feb 2003 04:04, [EMAIL PROTECTED] wrote:
> > I was looking at the
> > org.apache.avalon.cornerstone.blocks.datasources.DefaultDataSourceSelector
> > class in order to get inspiration to do a ServiceSelector that must
> > instanciate the components it will give based on configuration.
> 
> I would highly recomend that you don't use *Selectors. They were an ugly hack 
> put into place ages ago that I think most people now regret. Hopefully post 
> Fortress release we can start the process of deprecating them.

Damn! :-)

I added something like lookup(role, id) in Plexus and then from many
requests we put Selectors in to be compliant and now you want to get rid
of them! :-) I argued they sucked because I figured that you could look
up any component using lookup(role,id) and use any logic you wanted to
select an id. Same idea as a selector but it's not baked into the
container.

> I would instead recomend you create a custom work interface to manage your 
> components directly with a non-generic optimized interface. Most of these 
> Manager components still follow the same pattern but are specific to the 
> resource they manage. ie
> 
> interface FooManager
> {
>   Foo aquireFoo( int param1, String param2 );
>   void releaseFoo( Foo foo );
> }
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to