This content has been marked as final.
Show 1 reply
-
1. Unsynchronized HashMap hangs
belaban Dec 2, 2004 6:48 AM (in response to tmessu)We have (quite) random hangs in TreeCache.
TreeCache.getGlobalTransactionFromThread calls thread2GtxMap_.get(..)
which never returns. Using JDB and reading java.util.HashMap sources
it seems that we have a never ending loop of entries in the maps
index table. The only reason I could figure out is that HashMap, being
unsynchronized, is skrewed up by multiple simultaneous puts by
getGlobalTransactionFromThread.
Is there any reason why unsynchronized Map is used for thread2GtxMap_
and is there some other kind of synchronization protection that
is not apparent from TreeCache.java itself?