You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Alan D. Cabrera" <ad...@toolazydogs.com> on 2004/02/05 02:04:21 UTC

"bug" in remoting Correlator?

I notice that the Correlator class uses a WeakHashMap to store the
FutureResults.  However, the values in the map have strong references to
thier keys.  This means that the elements in the map never get removed
and you may as well use a HashMap.  Did I miss something?
 
 
Regards,
Alan
 
 

Re: "bug" in remoting Correlator?

Posted by Jeremy Boynes <je...@coredevelopers.net>.
Alan D. Cabrera wrote:

> 
> 
> I notice that the Correlator class uses a WeakHashMap to store the 
> FutureResults.  However, the values in the map have strong references to 
> thier keys.  This means that the elements in the map never get removed 
> and you may as well use a HashMap.  Did I miss something?
> 

Doesn't sound like it - WeakHashMap is for weak keys and this sounds 
like it needs weak values. There may be a version around that does this 
- if not, there's something that might work in the old lock code:

http://cvs.apache.org/viewcvs.cgi/incubator-geronimo/modules/core/src/java/org/apache/geronimo/lock/LockDomain.java?rev=1.3&view=auto

-- 
Jeremy