I'm quite excited to see two fairly significant OSGi-related projects released today: Spring-DM 1.2.0 and Pax Runner 0.18.0.
Most anybody interested in OSGi probably already knows what Spring-DM is, but for those that don't: Spring-DM blends the dynamic runtime and modularity of OSGi with the Spring Framework. This 1.2.0 release brings several improvements, but the one that I was most excited to see was integration with the OSGi Configuration Admin Service. This feature makes it possible to configure Spring bean properties using values taken from the Config Admin--either by autowiring or by using property placholders.
Perhaps you've also heard of Pax Runner. In short, Pax Runner simplifies starting up an OSGi framework (Equinox, Felix, Knopflerfish, or Concierge...any version) with a given set of bundles installed and started. In my opinion, version 0.18.0 is a significant release because of these four features:
- Auto-wrapping of JARs: If you ask Pax Runner to install a JAR file that isn't already an OSGi bundle, it will automatically wrap it on the fly. Actually, Pax URL's wrap: protocol has always supported this, but Pax Runner now lets you point at a directory full of JAR files and it will wrap the ones it needs to wrap before loading them.
- Composite provisioning: Often, in order to get a certain feature-set installed in OSGi you may have to install several bundles. Apache CXF's implementation of OSGi 4.2's Distributed OSGi involves 3 dozen distinct bundles. Loading them all one at a time can be a beating. Instead, using composite provisioning, you can define a reusable composite definition that defines everything to be loaded and then add it to your Pax Runner provisioning list as a single entry.
- New profiles: As of 0.18.0, Pax Runner profiles are now based on composite provisioning. That means that you can associate a composite provisioning specification with a shorter profile name. By placing the composite/profile in a profile repository, you can easily share composites among multiple OSGi projects. And, there are a lot of new profiles that come with Pax Runner.
- Update from original URLs: Historically, Pax Runner has installed bundles from a local cache, making it impossible to update a bundle from the URL that it was originally loaded from. To me, this seemed to break the dynamic update feature of OSGi. Now, with 0.18.0, Pax Runner lets bundles keep their original bundle location so that they can be updated more easily.
Congratulations to Costin Leau and everyone that worked on Spring-DM and also to Alin Dreghiciu and everyone that contributed to Pax Runner!
STOP THE PRESSES!!!
As I was writing this blog entry, I see that two other releases have been made on the Pax project: Pax URL 0.5.0 and Pax Exam 0.4.0 were both released in the last few minutes!
Pax URL is a set of URL handlers that enables loading of OSGi bundles from a variety of sources (such as a Maven or Ivy repository or from OBR). It also provides support for auto-wrapping non-bundle JARs, among other things. Pax Runner uses Pax URL when loading bundles, but it's also handy for loading bundles individually into an OSGi framework. It looks like the version 0.5.0 brings us a new link: protocol (for symbolic-link-like URLs) and the ability to use Pax URL handlers in non-OSGi scenarios.
Pax Exam is a testing framework for OSGi. The new 0.4.0 version seems to include (among other things) tighter integration with Maven, new support for various mocking frameworks, and support for Pax Runner 0.18.0. Toni Menzel has summarized the new features on his blog
Congratulations again to Alin Dreghiciu, Toni Menzel, and everyone who contributes to the Pax projects!
I'll be blogging more here about these frameworks and tools. I also cover Spring-DM, Pax Runner, and Pax Exam in Modular Java.