avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: RES: RES: Container Extensions
Date Fri, 12 Sep 2003 18:24:51 GMT
Hamilton VerĂ­ssimo de Oliveira wrote:

> But that's the point. How the component will access it's dependencies?
> Through look up I think. 

In the general case, yes.  However, let's not completely preclude the
possibility of a PicoContainer type of initialization (either all in
the constructor, or throught setter/getters).

> The component initialization protocol will be performed for this
> dependent component as it will for any other component - on demand -
> don't they? If don't, it will force us to threat them different, 
> - creating a separate LookupManager 
> - put the real instances of each dependent component there
> - praying for someone to dispose them

It doesn't have to be on demand.  You can do it all at one time.  You
will find that the shutdown order is *very* important.  I have experienced
some bugs where the container locked up on shutdown that went away when
we ensured everything was in the proper order.

All components should have their own "LookupManager" so that they only
see what they need to see.  Fortress is somewhat crippled in that respect.

As to your other two bullets:

- "real" instances--a proxied instance provides additional security, and
   a natural location to add interceptors (i.e. functions that get called
   before and after the interface method's call).

- "praying" for disposal--as much as possible we want to avoid "prayer"
   as a design constraint.  Don't get me wrong, I am a regular practicer
   of prayer, but it has its place. ;P  The container is responsible for
   properly disposing of components when they are no longer needed.

> The container ensuring the environment sanity is a good thing, but I
> can't see how to implement a different behavior for dependents
> components. Maybe my nighlty studies of Fortress and Merlin show me
> where I'm wrong.

I am definitely willing to help you through the hurdles.  So that I can help
bridge the gap, where are you in your understanding of how containers work?

>>BTW, did you get the mail I sent you RE: getting proper info for your
> CVS access?
> I didn't. To which email you sent? I don't work for Cimcorp anymore...
> :-(

Ahh, that is where I sent it.  What email is best for you?


"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin

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

View raw message