Some osgi-related news

Categories: Java, OSGi

Some OSGi-related content (some old, some new) that might be of interest.

I’ve written a couple of new osgi-related articles:

The following info is also interesting:

A while ago I created an osgi-aware serializer to solve some problems with a distributed system based on OSGi; I intend to write an article about that sometime. I recently found the (dead) Felix Serialization Service project that apparently intended to tackle the subject. Apparently, deserialization of remote service calls is still an unsolved topic, so my solution might be useful. Stay tuned!

Here is an interesting article about a feature of the bnd library : Conditional-Package.

I found a nicely written overview of OSGi by Neil Bartlett.

An alternative to the maven-bundle-plugin called bnd-maven-plugin is now available as part of the bnd project. While the older maven-bundle-plugin takes over the packaging of a jarfile (generating a manifest as part of that), the bnd-maven-plugin just generates the leaving the rest of the maven lifecycle alone - which has several advantages. It takes its config settings not via entries within the pom.xml but instead from a separate bnd.bnd file which can be shared with bnd-based or bndtools-based builds. See the linked article for details.

The oft-delayed JSR 376: Java Platform Module System is active again. This time both Peter Kriens (OSGi) and Bob Lee (Guice) are on the expert group. Hopefully this time some progress will be made.

I found an old post from 2011 discussing OSGi lite which supports the use of the OSGi registry and Bundle-Activators without the OSGi bundle concept, ie with a traditional jvm classpath. This at least provides bundle lifecycles (activator start, stop) and decoupled services via the registry, without requiring major changes to existing code. Sounds useful, although the [project](( appears to have been abandoned. Interesting to think about anyway..

OSGi Core R6 was released in June 2014 and includes a new chapter on “DTO” objects, which are simply representations of the state of internal objects in a form which can be mapped to JSON - ie are classes that have no logic, and only properties which are primitive types or arrays/lists/maps of primitive types. A standard set of DTO classes have been defined for the purposes of remote administration/monitoring. They are usually obtained by calling someOsgiClass.adapt(desiredDTOClass.class). The use of a common ‘adapt’ method avoids having multiple getter methods on the providing class - but at the cost of (a) a less discoverable API, and (b) having to use if-statements in the adapt method implementation to figure out what is actually wanted.

And while on the subject of OSGi release R6 : the core document was released in June 2014, but the “enterprise” part is still in draft version, as of the current date (May 2015)!

On a completely non-osgi-related topic : has shut down as of May 31 2015. Ouch. While not the biggest open-source hub around, it hosted several significant java-based projects. Presumably the active ones have moved off, but less-active ones (like maven-exec-plugin and maven-clirr-plugin) are no longer accessable.

comments powered by Disqus