[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ecf-dev] Discovery race condition?
|
On Jun 9, 2009, at 11:07 AM, Scott Lewis wrote:
Hi Bryan,
The listener is registered in the Activator of the
org.eclipse.ecf.osgi.services.discovery bundle, which is started
when the org.eclipse.ecf.osgi.services.distribution bundle is started.
So the key thing is that the
org.eclipse.ecf.osgi.services.distribution bundle must be started in
order to get everything going in a lazy start environment (like
Eclipse)...or a class in o.e.e.osgi.services.distribution accessed,
of course (as this will also start o.e.e.osgi.services.distribution
and discovery).
If the osgi distribution (and discovery) bundles are not started,
then yes...they will miss discovered services (assuming the ecf
discovery *has* been started). This constraint isn't unique to
ECF...as there was nothing in the spec (in my most recent reading of
RFC 119) that discusses starting/start order in various environments.
Even if they are started prior to the discovery provider, I assert
there is still a race condition. The listener is added asynchronously
to the provider which could have already discovered it's services,
could be in the process of discovering services, or may not discover
any services for several hours. Isn't this the exact same problem as
listening to regular OSGi services and why the ServiceTracker was
created?
We can/could/may use declarative services to manage these service
dependencies in the future, but didn't want to add another large set
of dependencies in this release cycle.
Scott
Bryan Hunt wrote:
For a remote service to be discovered by RFC 119, it appears that
it registers a listener with the IDiscoveryLocator. If services
are discovered before the listener is registered, how does the RFC
119 code discover those services? It seems there might be a race
condition here?
Bryan
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev