In the hopes of driving the adoption of OSGi-based development patterns in enterprise Java shops, SpringSource on Tuesday submitted its dm Server for acceptance as an Eclipse Foundation project.

Adam Fitzgerald, director of developer relations at SpringSource (which is owned by VMware), said that SpringSource has seen little uptake in OSGi usage from its enterprise customers. “What we’ve seen, and this is confirmed by others, is that while OSGi has had tremendous success in other areas like the IDE, and in places like embeddable devices, we haven’t seen the broad and widespread adoption of OSGi as a solution in enterprise Java,” he said. “There are certainly early adopters, but there is not as much penetration into the mainstream enterprise Java development world as we’d like.

“We think part of the reason might be the additional complexity that comes with building OSGi solutions. We need more common projects that are easily accessible to community members. We are moving dm Server over to Eclipse in the hopes that we can foster more use of OSGi.”

In essence, OSGi shoehorns a module component model into Java by describing an entire application life-cycle framework. The JCP is working on its own modular Java, but the OSGi Alliance and the Eclipse Foundation have already expanded the OSGi universe to include many tools, platforms and APIs. The benefits of OSGi, claim its proponents, are exemplary of service-oriented architecture and of the future of Java itself.

Building with OSGi, which has outlived the meaning of its original acronym (Open Services Gateway Initiative), allows JAR files to be packaged along with metadata that describe the application. OSGi bundles (the deployable artifacts) describe public and private spaces in code, allowing for greater control over access and usage.

OSGi’s modular nature also allows developers to deploy updates to underlying libraries and applications without requiring a restart of the host JVM. With OSGi, life cycles include deployment to live machines without any interruptions.

SpringSource and Sun both support OSGi in their application servers; Sun’s GlassFish contains OSGi support. Fitzgerald said neither dm Server nor any OSGi-based application server can provide the benefits of OSGi-based architecture without properly prepared code.

Problems with overhead
Jason van Zyl, creator of Maven and founder of Sonatype, said that the biggest problem for OSGi uptake is that the tools for building and handling OSGi bundles are still formative and difficult to deploy.

About Alex Handy

Alex Handy is the Senior Editor of Software Development Times.