cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <>
Subject [jira] [Reopened] (DOSGI-180) CXF service does not disappear if exporting bundle is stopped
Date Wed, 15 May 2013 10:39:17 GMT


Christian Schneider reopened DOSGI-180:

Jon explained in a mail on the list that there is probably a race condition.
I also think so and think there is no simple fix to that. 

The problem is that the ExportReference field are set to null when the export reg is closed.
When the zookeeper discovery then is notified of the change it tries to read the reference
but only sees null values.

When I stop the bundle I see that the ServiceTracker declared at
org.apache.cxf.dosgi.dsw.service/ExportRegistrationImpl line 178 is
invoked - in fact it's the removedService() method of that. This in turn
calls close() on the ExportReferenceImpl, which simply sets the
endpointDescription and serviceReference fields to null.

Some time after this then the ServiceListener declared at line 96 of
gets called. This in turn works out what EndpointListeners to notify
that the endpoint has been removed ( the method notifyListenersOfRemoval
at line 126 in
org.apache.cxf.dosgi.topologymanager.exporter.EndpointListenerNotifier )
- and it's one of these
which deleted the zookeeper node.

However, the logic in notifyListenersOfRemoval uses the
endpointDescription to work out which listeners to notify - and at this
point it's set to null, so none at all are selected, meaning that the
zookeeper node isn't deleted.

So it looks like this may be a race condition - is there any reason why
the correct sequence (ServiceListeners called before ServiceTracker ?)
should happen which would mean the the node is deleted ?
> CXF service does not disappear if exporting bundle is stopped
> -------------------------------------------------------------
>                 Key: DOSGI-180
>                 URL:
>             Project: CXF Distributed OSGi
>          Issue Type: Bug
>          Components: DSW
>    Affects Versions: 1.4.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 1.5
> I used the example at but with an address
of "/display".
> The cxf endpoint came up when starting the feature but did not go down when stopping
the service bundle.
> See this post for the original bug report:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message