ConcurrentModificationException when a resource shuts down
----------------------------------------------------------
Key: MUSE-286
URL: https://issues.apache.org/jira/browse/MUSE-286
Project: Muse
Issue Type: Bug
Components: Core Engine - Resource and Capability APIs
Affects Versions: 2.2.0
Environment: any
Reporter: Eitan Plotnik
Assignee: Dan Jemiolo
A ConcurrentModificationException is thrown when a resource shuts down.
removeEntry method is unsafly accessing _entriesByMemberEPR data member.
I think following methods should be synchronized since they all access
_entriesByMemberEPR:
public WsResource addEntry(EndpointReference memberEPR, WsResource entry)
public WsResource[] getEntry()
public WsResource getEntry(EndpointReference memberEPR)
public void removeEntry(WsResource entry)
Exception stack trace:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
at java.util.HashMap$KeyIterator.next(HashMap.java:877)
at
org.apache.muse.ws.resource.sg.impl.SimpleServiceGroup.removeEntry(SimpleServiceGroup.java:345)
at
org.apache.muse.ws.resource.sg.impl.SimpleEntry.shutdown(SimpleEntry.java:160)
at
org.apache.muse.core.SimpleResource.shutdownCapabilities(SimpleResource.java:569)
at org.apache.muse.core.SimpleResource.shutdown(SimpleResource.java:502)
at
com.cisco.nm.cmp.nbi.wsdm.server.sg.ServiceGroup.resourceRemoved(ServiceGroup.java:325)
at
org.apache.muse.core.SimpleResourceManager.removeResource(SimpleResourceManager.java:425)
at org.apache.muse.core.SimpleResource.shutdown(SimpleResource.java:513)
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]