Hello J�rg,

> Hello Fortress users (and developers :),
>
> can anyone explain me, why these proxy objects are used and what
> they are good for or give me any pointer? Currently we are concerned
> about the impact in run-time and the inconvenience debugging the
> service's code. I recognized the the comments from Peter Royal:
>
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg00059.html
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg00069.html
>
> So my bottom line: If I do not expect to use legacy components currently,
> do not pay for it. Other opinions?
>
> Regards,
> J�rg

I am not at all familiar with Fortress, having just a superficial knowledge
of the source code. Consequently, I am neither familiar with the original
intentions of the developers who wrote the proxy code. Still, one benefit
that springs to mind is a client object's inability to use a given
component's lifecycle interfaces. Since Avalon and consequently Fortress
decree that a component's lifecycle be managed by its container and no other
entity, hiding a component's lifecycle interfaces from client objects is a
GOOD THING TM.

I think this is why ProxyHelper skips all lifecycle interfaces when
determining the set of interfaces a certain component should implement.
Please note that due to the usage of PassThroughInvocationHandler it will
still be possible for a client to call i.e. foo.dispose() on a component
instance foo if the client is certain that foo implements Disposable. This
won't work, though: ((Disposable)foo).dispose().

I have some more or less working code in place that replaces
ProxyObjectFactory with a BCELObjectFactory that uses BCEL to dynamically
create wrapper classes that only implement a given component's work
interfaces. The code probably needs a lot of polish and could possibly use
some refactoring, but it's a starting point. So if anyone should be
interested I will gladly post it to this list or any other appropriate
place.

Regards,
Olaf


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

Reply via email to