on Jan 26th, 2009Tip: Eclipse Applications, Startlevels and DS
Have you ever worked with OSGi Declarative Services (DS) within an Eclipse context… like an RCP application? Do you remember the pain of figuring out how to hack DS so it’s always started so your services can be available? Well, in Eclipse 3.5, this process will be a lot easier. For example, starting with Eclipse 3.5M5, PDE will allow you to modify start levels of PDE-based launch configurations:
PDE is also smart enough to suggest that DS should always be started so you don’t always have to worry about it. On top of that, the product definition format now has the ability to modify start levels which should help you when you’re building and packaging RCP applications:
If you don’t know much about DS, but would like to learn, I highly recommend these two introductory articles by Neil Bartlett:
- Getting Started with OSGi: Introducing Declarative Services
- Getting Started with OSGi: Declarative Services and Dependencies
The Equinox OSGi book also has great, indepth content on Declarative Services if you’re interested.
In the end, I think DS is a great lightweight way to work with services as it helps you avoid a lot of the tricky and error-pone code you have to write while working with services. Hope this helps!
Related posts:



hi chris,
good news to see that PDE will support DS better
ekke
btw: your screenshots cannot be expanded
@ekke, forgive me! It looks like WordPress had a little hiccup.
I fixed it and you should get a link to the fullscreen shots.
chris, thanks for soon fixing and those great new features making my life easier.
ekke
@ekke, np… keep the reports coming. It’s the community that helps push PDE into interesting directions. Otherwise, the PDE team will do what it think it’s right
From the looks of it, DS will ship with the Eclipse SDK in 3.5
http://dev.eclipse.org/mhonarc/lists/eclipse-dev/msg08498.html
https://bugs.eclipse.org/bugs/show_bug.cgi?id=253926
I haven’t tried the support for lazy starting bundles yet, but this was the only pain point I had when exploring DS. Let’s get it in the SDK!