Re: Fwd: Circular Reference on WeakHashMap

2007-08-07 Thread Clebert Suconic
The insomnia got me today... Couldn't sleep! :-) https://issues.apache.org/jira/browse/BEANUTILS-291 There is a proposed fix on the JIRA.. it works! Nice.. isn't? The idea is to use a WeakHashMap on the Property also. I don't think this would cause performance issues, since WeakhashMap woul

Re: Fwd: Circular Reference on WeakHashMap

2007-08-07 Thread Clebert Suconic
I just added the testcase to this JIRA: https://issues.apache.org/jira/browse/BEANUTILS-291 And it replicated the problem as expected... The test fails as expected... I have done some double checks, and it is the same scenario as it would happen on any application server. Niall Pemberton w

Re: Fwd: Circular Reference on WeakHashMap

2007-08-07 Thread Clebert Suconic
> should the second sample on the wiki page not contain > SoftReference reference = new SoftReference(x); instead of > WeakReference reference = new WeakReference(x); ? Yep! :-) Just fixed it. Thanks! Clebert - To unsubscrib

Re: Fwd: Circular Reference on WeakHashMap

2007-08-06 Thread Heinz Drews
Hello Clebert, should the second sample on the wiki page not contain SoftReference reference = new SoftReference(x); instead of WeakReference reference = new WeakReference(x); ? Regards, Heinz On 8/7/07, Clebert Suconic <[EMAIL PROTECTED]> wrote: > > Yes, but that reference can be garbage colle

Re: Fwd: Circular Reference on WeakHashMap

2007-08-06 Thread Niall Pemberton
On 8/7/07, Clebert Suconic <[EMAIL PROTECTED]> wrote: > > Yes, but that reference can be garbage collected - so would have to > > handle that as well. In this instance each AbstractConverter > > implementation only ever returns the same value - so I think its > > simpler to remove the class ref

Re: Fwd: Circular Reference on WeakHashMap

2007-08-06 Thread Clebert Suconic
> Yes, but that reference can be garbage collected - so would have to > handle that as well. In this instance each AbstractConverter > implementation only ever returns the same value - so I think its > simpler to remove the class reference - for example in > IntegerConverter it would just have: n

Re: Fwd: Circular Reference on WeakHashMap

2007-08-06 Thread Niall Pemberton
On 8/7/07, Clebert Suconic <[EMAIL PROTECTED]> wrote: > > Yes it does (thru' AbstractConveter which it extends) - I can remove > > that reference completely by just making the getDefaultType() method > > abstract and having each implementation implement it. > > > > Just an idea... You could jus

Re: Fwd: Circular Reference on WeakHashMap

2007-08-06 Thread Clebert Suconic
> Yes it does (thru' AbstractConveter which it extends) - I can remove > that reference completely by just making the getDefaultType() method > abstract and having each implementation implement it. > Just an idea... You could just have the Abstract class holding a WeakReference and then: WeakR

Fwd: Circular Reference on WeakHashMap

2007-08-06 Thread Niall Pemberton
Woops, should have gone to dev@ list -- Forwarded message -- From: Niall Pemberton <[EMAIL PROTECTED]> Date: Aug 7, 2007 2:36 AM Subject: Re: Circular Reference on WeakHashMap To: Clebert Suconic <[EMAIL PROTECTED]> On 8/7/07, Clebert Suconic <[EMAIL PROTECTED]> wrote: > The solu