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

Tomas Forsman commented on AXIS2-5329:
--------------------------------------

I do no longer believe that just making the "updated" method synchronized is 
the correct solution. After reviewing the code a bit more I believe it has 
other issues..

>From the method OSGiConfigurationContextFactory.updated(Dictionary dictionary)
                Registry servicesRegistry = new ServiceRegistry(context, 
configCtx);
                Registry moduleRegistry = new ModuleRegistry(context, 
configCtx, servicesRegistry);
                bundleTracker.addRegistry(servicesRegistry);
                bundleTracker.addRegistry(moduleRegistry);
                bundleTracker.open();

I believe this means that if the configuration for the axis2 bundle is updated, 
the BundleTracker will get more and more Registy registered.. also the 
"updated" method registers services every time it is run.. possible that the 
OSGi container fix this under the hood, but i'm not sure.
                
> ConcurrentModificationException from org.apache.axis2.osgi during startup
> -------------------------------------------------------------------------
>
>                 Key: AXIS2-5329
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5329
>             Project: Axis2
>          Issue Type: Bug
>          Components: modules
>    Affects Versions: 1.6.2
>         Environment: Linux, Karaf using felix, 
>            Reporter: Tomas Forsman
>         Attachments: axis2-karaf-example.zip
>
>
> I receive the following exception during startup of the axis2 osgi bundle:
> ERROR: Bundle org.apache.axis2.osgi [77] EventDispatcher: Error during 
> dispatch. (java.util.ConcurrentModificationException)
> java.util.ConcurrentModificationException
>       at 
> java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
>       at java.util.AbstractList$Itr.next(AbstractList.java:343)
>       at 
> org.apache.axis2.osgi.deployment.tracker.BundleTracker$1.bundleChanged(BundleTracker.java:68)
>       at 
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
>       at 
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
>       at 
> org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949)
>       at 
> org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
>       at 
> org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
>       at java.lang.Thread.run(Thread.java:662)
> From looking at the code, I guess that a quick fix would be to make the 
> following method synchronized:
> OSGiConfigurationContextFactory.updated(Dictionary dictionary)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to