Questions inside...
Quoting Jason van Zyl <[EMAIL PROTECTED]>:
> On Thu, 2003-02-20 at 06:18, Peter Donald wrote:
> > 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 can't understand why this design is bad... Can someone explain me ??? The
general contract of ServiceSelector is that it returns the corresponding
instance given a policy object. I don't think this is an error to have this
interface, in that it enables base implementation such as the responsability
chain i made. But this interface is not in the main interface package. It is in
the implementation package, so this is an implementation thing, it is consistent
that i can use general Selector implementations for this.
com.cleverage.content
- ContentManager interface
- ContentProvider interface
com.cleverage.content.impl
- DefaultContentManager class
- ContentProviderSelector interface
(extends ServiceSelector)
- DefaultContentProviderSelector class
(extends ResponsabilityChainServiceSelector)
> > 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.
But this does not answer my initial question that is :
How do i instanciate the objects i must return without calling ContainerUtil
methods directly ?
This is because i should not know what lifecycle do implement my selected objects.
A+. Didier.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]