Hi Peter,

Added bug 18296 to Bugzilla. Proposed patch added as attachment 5483. Could
probably still use some polishing.

Cheers,
Olaf

Peter Donald wrote:
> Forwarding to dev so that someone will apply.
>
> BTW Olaf would you mind putting the patches into Bugzilla so no
> one forgets?
>
> ----------  Forwarded Message  ----------
>
> Subject: AW: AW: [Newbie] Proxy objects in Fortress - why?
> Date: Thu, 20 Mar 2003 18:28:40 +0100
> From: "Olaf Bergner" <[EMAIL PROTECTED]>
> To: "Avalon framework users" <[EMAIL PROTECTED]>
>
> Hi,
>
> meanwhile, I have updated the wrapper I created. The modified
> WrapperObjectFactory (an implementation of
> org.apache.excalibur.mpool.ObjectFactory) implements the dispose(Object)
> method. The rest of my notes (see below) still applies.
>
> Attached is the modified diff (unified), to be applied against the
> org.apache.avalon.fortress.impl.handler package. Hopefully, someone will
> find it useful.
>
> Greetings,
> Olaf
>
> > Hi,
> >
> > Could someone look at this and apply the changes?
> >
> > Hi Peter,
> >
> > Some notes:
> >
> > 1) In order to implement dispose() of
> > org.apache.excalibur.mpool.ObjectFactory there's got to be a
> way of asking
> > the generated wrapper class for the wrapped class. I have been
> > reluctant to
> > implement the equivalent of Object getWrappedObject() since this
> > would offer
> > clients a way of bypassing the wrapper class' purpose. Anyways, if you
> > should find the code useful I would offer to add such a method.
> >
> > 2) No effort was made to make WrapperObjectFactory threadsafe. I am no
> > expert in concurrent programming, and I am not sure if an
> > implementation of
> > ObjectFactory is supposed to operate in a multithreaded environment.
> >
> > 3) The HandlersTestCase will fail, since none of the work
> > interfaces Role1,
> > Role2, ... implements the method getID() this test case calls.
> This works
> > for the ProxyObjectFactory due to its usage of the
> > PassThroughInvocationHandler. Add those methods and the test
> case passes.
> > IMHO, this constitutes a minor bug, er ... shortcoming in the
> > test suite but
> > you will have to decide for yourself.
> >
> > 4) I added 5 classes: WrapperObjectFactory, WrapperGenerator,
> > BCELWrapperGenerator, BCELCodeGenerator and ProxyUtility. The
> > latter factors
> > out some methods from ProxyHelper which I decided to leave untouched, so
> > this is a severe case of code duplication ;).
> >
> > 5) In order to see the new code at work you will have to replace new
> > ProxyObjectFactory(...) in
> AbstractContainer.createObjectFactory(...) with
> > new WrapperObjectFactory(...), but whom do I tell this ...
> >
> > Please let me know if you should have any issues with the code
> that might
> > need attention. I will try to fix it as soon as I find some spare
> > time (I am
> > in the final months of my diploma in mathematics, so right now I am more
> > concerned with group theory, topology, ... than with BCEL byte
> > code manglers
> > ;)).
> >
> > Oh, yes, regarding the code: You may tweak, rewrite, refactor it,
> > port it to
> > VB ..., er, no, wait! Don't do that! If you want to have it, it's yours.
> >
> > Cheers,
> >
> > Olaf Bergner
> >
> > -------------------------------------------------------
> >
> >
> > --
> > Cheers,
> >
> > Peter Donald
> > *--------------------------------*
> >
> > | Every rule has an exception,   |
> > | except the rule of exceptions. |
> >
> > *--------------------------------*
>
> -------------------------------------------------------
>
>
> --
> Cheers,
>
> Peter Donald
> ----------------------------------------
> Why does everyone always overgeneralize?
> ----------------------------------------
>


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

Reply via email to