[
https://issues.apache.org/jira/browse/DOSGI-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904574#action_12904574
]
Marco Mauri commented on DOSGI-76:
----------------------------------
I think to have pinned down the error: the method removeService of the
TopologyManager should notify all the registered EndpointListener of the
removed service.
I attach a patch that I wrote to solve my problem.
> EndpointListener.endpointRemoved
> --------------------------------
>
> Key: DOSGI-76
> URL: https://issues.apache.org/jira/browse/DOSGI-76
> Project: CXF Distributed OSGi
> Issue Type: Bug
> Environment: Eclipse 3.5
> CXF Dosgi 1.2
> Reporter: Marco Mauri
> Attachments: TopMan.diff
>
>
> The endpointRemoved method of a registered EndpointListener is never called
> even if an exported service is unregistered.
> I've written a simple Endpoint listener:
> public class EndpointListenerImpl implements EndpointListener {
> private static final Logger logger =
> Logger.getLogger(EndpointListenerImpl.class.getName());
> @Override
> public void endpointAdded(EndpointDescription arg0, String arg1) {
> logger.severe("Added: " + arg0);
>
> }
> @Override
> public void endpointRemoved(EndpointDescription arg0, String arg1) {
> logger.severe("Removed: " + arg0);
>
> }
> }
> and registered it in my activator:
> public void start(BundleContext context) throws Exception {
> Properties props = new Properties();
> props.put(EndpointListener.ENDPOINT_LISTENER_SCOPE, "(" +
> Constants.OBJECTCLASS + "=*)");
> reg = context.registerService(EndpointListener.class.getName(),
> new EndpointListenerImpl(), props);
> logger.severe("REGISTRATO");
> }
> the endpointAded is correctly called for every exported service but the
> endpointRemoved is never called, even if I start/stop several time the bundle
> that registers the exported services.
> I discovered this because a service published on Zookeper via the remote
> discovery bundle is never unpublished until i stop all the Dosgi bundles even
> if I stop the service that register the service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.