[jboss-jira] [JBoss JIRA] Updated: (JBAS-5923) Weak hash map usage in UnifiedInvokerHAProxy is not thread safe

Galder Zamarreno (JIRA) jira-events at lists.jboss.org
Wed Sep 3 09:09:39 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBAS-5923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Galder Zamarreno updated JBAS-5923:
-----------------------------------

    Fix Version/s: JBossAS-4.2.4.GA


> Weak hash map usage in UnifiedInvokerHAProxy is not thread safe
> ---------------------------------------------------------------
>
>                 Key: JBAS-5923
>                 URL: https://jira.jboss.org/jira/browse/JBAS-5923
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Clustering, Transaction Manager (JBossTM)
>    Affects Versions: JBossAS-5.0.0.CR1, JBossAS-4.2.3.GA
>            Reporter: Galder Zamarreno
>            Assignee: Galder Zamarreno
>             Fix For: JBossAS-5.0.0.CR2, JBossAS-4.2.4.GA
>
>
> txFailoverAuthorizations weak hashmap that is now also used for 
> maintaining transaction stickyness was created as an unsynchronized
>  WeakHashMap and this was causing issues.
> It was not enough to synchronise on the tpc (key of map) whenever
> we manipulated it because two threads, trying to store different tpcs 
> could end up trying to resize the map and as a result, key value 
> pairs could easily dissapear from the hash map. 
> This is extremely confusing because we thought the disappearance 
> was due to garbage collection.
> From now on, we'll be using a Collections.synchronizedMap(new WeakHashMap());
> instead. Thanks to Adrian for the help debugging this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list