You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Viral Gohel (JIRA)" <ji...@apache.org> on 2017/10/03 10:06:00 UTC
[jira] [Commented] (CAMEL-11876) OsgiCamelContextPublisher might
leak Service-References
[ https://issues.apache.org/jira/browse/CAMEL-11876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16189492#comment-16189492 ]
Viral Gohel commented on CAMEL-11876:
-------------------------------------
Hi,
Thanks for reporting this. Do you have an application reproducer to test this ? or how are you observing this? Can you attach a snapshot of the memory leak suspects you have identified and attached it to the ticket ?
> OsgiCamelContextPublisher might leak Service-References
> -------------------------------------------------------
>
> Key: CAMEL-11876
> URL: https://issues.apache.org/jira/browse/CAMEL-11876
> Project: Camel
> Issue Type: Bug
> Components: osgi
> Reporter: Christoph Läubrich
>
> OsgiCamelContextPublisher holds a Map of Service-References in its doShutdown method this map is cleared.
> This could lead to problem when there are still items in the map.
> Instead of clearing the map, it should be iterate+remove
> {code:java}
> Iterator<ServiceRegistration<?>> it = registrations.values().iterator();
> while (it.hasNext()) {
> it.next().unregister();
> it.remove();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)