I am starting a project with OSGi and I am facing a very important choice while defining the way I will handle service registration etc...
If I am not mistaken, I have three choices :
org.springframework.*
?Do you have any comments or information about my interrogations ? Have you a preferred choice (and why ?) or do you use an other solution not included in my list ?
Thanks very much in advance.
Declarative Services (DS) are not deprecated, they are in fact the cleanest way of handling service binding/unbinding in OSGi. You could do it manually, and this may be better depending on your use-cases, but generally DS are good. SpringDM uses Equinox underneath, but they have wrapped it for you to make certain things more Springy. I've never tried SpringDM so can't comment much.
If you are planning on using/integrating Spring in the future, start with SpringDM. Otherwise, start with DS. If you ever need to do something DS cannot handle, you can do it manually with service trackers. It is acceptable to mix DS and manual service handling.
I think you have a fourth option called "Blueprint" which was proposed as an alternative to DS sometime in the last 2 years. I don't know where they got to, but I think SpringDM might be using this internally.