commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38853] - [collections] ReferenceMap clears bindings too early
Date Sat, 25 Mar 2006 19:20:01 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38853>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38853


scolebourne@joda.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From scolebourne@joda.org  2006-03-25 19:20 -------
Thanks for the report.

Unfortunately, it hasn't helper me understand the issue particularly. I can
reproduce the trace you supply (note that log_jre is missing from the zip).
However, this doesn't help me understand what is going on.

For a start, I can't even find the piece of code where the commons ReferenceMap
is being created. I can't see what sequence of operations is being called, etc.

This is a general problem with aspects - they break so much of what programmers
expect from Java.

In fact, I believe that this is just a special example of not correctly
synchronizing the ReferenceMap implementation. For example, here is the javadoc
of the purge mathod:
    /**
     * Purges stale mappings from this map.
     * <p>
     * Note that this method is not synchronized!  Special
     * care must be taken if, for instance, you want stale
     * mappings to be removed on a periodic basis by some
     * background thread.
     */

And the javadoc from the top of the class:
 * This implementation is not synchronized.
 * You can use {@link java.util.Collections#synchronizedMap} to 
 * provide synchronized access to a <code>ReferenceMap</code>.


Basically, ReferenceMap has no synchronization, and no thread handling. Its only
interaction with threads is via the standard JDK API on a ReferenceQueue.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message