[jboss-jira] [JBoss JIRA] Updated: (JBMESSAGING-1707) ConcurrentModificationException in ClientClusteredConnectionFactoryDelegate

Yong Hao Gao (JIRA) jira-events at lists.jboss.org
Thu Sep 8 23:33:37 EDT 2011


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

Yong Hao Gao updated JBMESSAGING-1707:
--------------------------------------

    Fix Version/s: 1.4.8.SP4
                       (was: 1.4.8.SP3)


> ConcurrentModificationException in ClientClusteredConnectionFactoryDelegate
> ---------------------------------------------------------------------------
>
>                 Key: JBMESSAGING-1707
>                 URL: https://issues.jboss.org/browse/JBMESSAGING-1707
>             Project: JBoss Messaging
>          Issue Type: Quality Risk
>          Components: JMS Client Manager
>    Affects Versions: 1.4.3.GA
>            Reporter: Pavel Slavicek
>            Assignee: Clebert Suconic
>             Fix For: 1.4.0.SP3.CP15, 1.4.8.SP4
>
>
> I have found ConcurrentModificationException in ClientClusteredConnectionFactoryDelegate.
> Exception in thread "Thread-11" java.util.ConcurrentModificationException
> 	at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:784)
> 	at java.util.WeakHashMap$KeyIterator.next(WeakHashMap.java:817)
> 	at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate$FinalizerShutdownHook.run(ClientClusteredConnectionFactoryDelegate.java:414)
> Client:
> client with multiple threads, every thread creates-sends-receives-closes. 
> Problem description:
> Problem is in the ClientClusteredConnectionFactoryDelegate.java in the inner class FinalizerShutdownHook.
> Shutdown hook implementation should to be written as thread safe (see javadoc for addShutdownHook() method). 
> Method run() in the FinalizerShutdownHook class iterates over all elements in the registered delegates 
> but this iteration should be synchronized on the delegates object. 
> Please see http://java.sun.com/javase/6/docs/api/java/util/Collections.html#synchronizedSet%28java.util.Set%29

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list