Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Declarative Services


Declarative Services (DS) is part of the OSGi specification.  The specification has been implemented by Eclipse's Equinox project. The DS specification is typically implemented as one or more bundles, separately from the core OSGi framework, which is why it appears to be an Eclipse/Equinox component.  You can use Equinox's DS implementation with other OSGi framework implementations.

Your code registers an OSGi service using the BundleContext class' programmatic APIs.  OSGi services can also be registered using the DS by describing the services via a "component"  in XML.  Whether you register an OSGi service via the BundleContext class' programmatic APIs, or via DS makes no difference.  You could very easily take your IImageSegmentation object an register it as a service using DS.  A service is a service no matter how you register it with the OSGi Service Registry.

If you want to learn more about DS, I recommend the following book that has excellent coverage of DS:
        http://equinoxosgi.org/
        http://www.amazon.com/OSGi-Equinox-Creating-Modular-Systems/dp/0321585712/ref=sr_1_1?s=books&ie=UTF8&qid=1288816761&sr=1-1

Good luck,

Simon


From: Santiago Hurtado Gutierrez <s-hurtad@xxxxxxxxxxxxxxx>
To: equinox-dev@xxxxxxxxxxx
Date: 11/03/2010 04:27 PM
Subject: [equinox-dev] Declarative Services
Sent by: equinox-dev-bounces@xxxxxxxxxxx





Hi all

I have been working with JNA for sometime now using c++ components like follows

service = (IImageSegmentation) Native.loadLibrary("SmoothSegmentation", IImageSegmentation.class);
registry = bundleContext.registerService(IImageSegmentation.class.getName(), service, null);

My question is if there is any chance to use them as declarative services, all of this is to maybe be able to use e4

Also I will like to know why the declarative services are a eclipse component and no a OSGi since the specification has DS

Thanks in advance_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



Back to the top