[
https://issues.apache.org/jira/browse/FELIX-5153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15075033#comment-15075033
]
Pierre De Rop commented on FELIX-5153:
--------------------------------------
I reproduced. (Thanks a lot for the nice bndtools sample project !)
I think all comes from the ComponentImpl.unregisterService() method (DM4),
which currently does this:
{code}
private void unregisterService() {
if (m_serviceName != null && m_registration != null) {
try {
if (m_bundle != null && m_bundle.getState() == Bundle.ACTIVE) {
m_registration.unregister();
}
} catch (IllegalStateException e) { /* Should we really log this ?
*/}
autoConfigureImplementation(ServiceRegistration.class,
NULL_REGISTRATION);
m_registration = null;
}
}
{code}
you see the "if (m_bundle != null && m_bundle.getState() == Bundle.ACTIVE) {"
-> this is the root cause.
I will work on the fix tonight.
can you please tell me if you need a quick release ?
> DM4 calls stop before ungetService() on ServiceFactory components
> -----------------------------------------------------------------
>
> Key: FELIX-5153
> URL: https://issues.apache.org/jira/browse/FELIX-5153
> Project: Felix
> Issue Type: Bug
> Components: Dependency Manager
> Reporter: Bram de Kruijff
> Priority: Critical
>
> When you remove a ServiceFactory component DM4 will call the stop method
> before the the framework has called ungetService() for all service instances.
> This seems to be a regression from DM3 and breaks any implementation that
> relies on previous behavior for cleanup.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)