[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] finding a BundleContext
- From: Scott Lewis <slewis@xxxxxxxxxxxxx>
- Date: Sat, 23 Dec 2006 09:06:25 -0800
- Delivered-to: firstname.lastname@example.org
- User-agent: Thunderbird 18.104.22.168 (Windows/20061207)
FYI, the Eclipse Communication Project http://www.eclipse.org/ecf has
defined and implemented a remote services API
(org.eclipse.ecf.remoteservices) that provides:
1) A service registry distinct from the platform service registry...that
is automatically distributed/replicated into a group of authenticated peers
2) A service interface that includes both synchronous and asynchronous
remote invocation...so a programmer can choose based upon
3) Explicit remote service failure handling...so network failure
conditions can be handled in a programmer-defined manner.
3) The ECF remoteservices API is also transport independent...allowing
it to be bound to any number of protocols.
One other difference with the existing registry is that services that
are to be exposed for remote access have to explicitly registered with
the ECF remoteServices registry(s). Although an 'extra' step for
programmer (it looks very much like bundleContext.registerService), it
does guarantee that the remote service is exposed in expected ways.
Marcel Offermans wrote:
Tom Huybrechts wrote:
For the registration of the services I use the BundleContext of the
bundle that declares the interface, so the lifecycle of the services
will be limited to that of their bundle.
The reason I don't register the services in their own bundle's
- I don't want to repeat this for every service bundle
- The bundle shouldn't care exactly how the connection to the remote
service is handled
I have this working now, but am open to suggestions for other ways to
I have a suggestion:
When you register a service, add a service property to indicate that
this is a remote service. Use a separate bundle (like you do now) to
listen to all services that are registered that have this service
property (use a ServiceTracker with ServiceTrackerCustomizer and
you'll get notified automatically). Have it register the remote services.
This way you're coupling the life-cycle of your remote services to the
life-cycle of your services (instead of that of your bundles).
equinox-dev mailing list