axis-java-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/AXIS2-3958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619198#action_12619198
] 

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. 

thanks,
nandana

> ConcurrentModificationException in AxisConfiguration
> ----------------------------------------------------
>
>                 Key: AXIS2-3958
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3958
>             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(HashMap.java:841)
> 	at java.util.HashMap$KeyIterator.next(HashMap.java:877)
> 	at org.apache.axis2.engine.AxisConfiguration.removeServiceGroup(AxisConfiguration.java:395)
> 	at org.apache.axis2.client.ServiceClient.cleanup(ServiceClient.java:813)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message