axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nandana Mihindukulasooriya (JIRA)" <>
Subject [jira] Commented: (AXIS2-3958) ConcurrentModificationException in AxisConfiguration
Date Sat, 02 Aug 2008 06:05:47 GMT


Nandana Mihindukulasooriya commented on AXIS2-3958:

Hi Hans,
           As this is a minor release I don't think we can go for a API change. Only thing
that came to mind is also the second option you are suggesting. So we synchronize the allServices
Map within Axis Configuration and getServices will only provide a copy of the Map and not
the map it self. I checked the usages of this method with in Axis2 and they all seems to be
read only cases . But as this is a public method, we can't be so sure :(. 
For synchronization I used a ReentrantReadWriteLock from backport which allows read/read operations
but not read/write. 
And I cloned the HashMap in getService() which provides a shallow copy of the map and it will
uses the existing keys and values (will not create copies of them).

But need to get this patch reviewed to make sure. 


> ConcurrentModificationException in AxisConfiguration
> ----------------------------------------------------
>                 Key: AXIS2-3958
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>         Environment: Axis2 1.4.1 RC1 artifiacts
>            Reporter: Hans G Knudsen
>             Fix For: 1.4.1
> Hi!
> I ran into a :
> java.util.ConcurrentModificationException
> 	at java.util.HashMap$HashIterator.nextEntry(
> 	at java.util.HashMap$
> 	at org.apache.axis2.engine.AxisConfiguration.removeServiceGroup(
> 	at org.apache.axis2.client.ServiceClient.cleanup(
> In my testsetup I run 5 concurrent threads each running a series of request .
> - all creating a new ServiceClient pr request
> - reusing the same ConfigurationContext.
> /hans

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message