Exception thrown when unregistering services because the bundle is stopped
--------------------------------------------------------------------------
Key: FELIX-952
URL: https://issues.apache.org/jira/browse/FELIX-952
Project: Felix
Issue Type: Bug
Components: Framework
Reporter: Guillaume Nodet
I have a bundle which happens to unregister some services from a
ServiceListener.
What happens is that when the bundle is stopped,
ServiceRegistry#unregisterServices(Bundle) is called.
This method unregister services one by one. When one service has been
unregistered, my listener is called which unregister another service.
When the loop iterator to this very service, an exception is thrown.
{code}
Caused by: java.lang.IllegalStateException: Service already unregistered.
at
org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:108)
at
org.apache.felix.framework.ServiceRegistry.unregisterServices(ServiceRegistry.java:135)
at org.apache.felix.framework.Felix._stopBundle(Felix.java:2032)
at org.apache.felix.framework.Felix.stopBundle(Felix.java:1952)
at org.apache.felix.framework.Felix._uninstallBundle(Felix.java:2106)
at org.apache.felix.framework.Felix.uninstallBundle(Felix.java:2076)
at org.apache.felix.framework.BundleImpl.uninstall(BundleImpl.java:425)
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.