OSGi 4.2 Blueprint Implementation in Latest WAS 7 Feature Pack

DZone 's Guide to

OSGi 4.2 Blueprint Implementation in Latest WAS 7 Feature Pack

· Java Zone ·
Free Resource
IBM is taking another step forward in its goal to make OSGi easier for developers with existing Java EE applications and infrastructure.  The company recently released an Open Beta feature pack with new OSGi application support and JPA 2.0 support.  A few months ago DZone spoke with IBM Distinguished WebSphere Engineer Ian Robinson about the Open Alpha for OSGi support in WAS 7 (WebSphere Application Server).  Robinson is also a committer on the Apache Aries project, which provides the implementation of the OSGi 4.2 Blueprint specification used in the latest WAS 7 feature pack.

WAS 6.1 was the first version of IBM's application server to harness OSGi for its own internal infrastructure, allowing developers to use WebSphere as a componentized runtime.  The current efforts by Robinson and his peers are focused on bringing the benefits of OSGi to enterprise application developers.  OSGi can aid application development by solving problems around complexity, maintenance, and extensibility.  

To bring OSGi benefits to the application developer, IBM looked to the OSGi Alliance Enterprise Expert Group (EEG) for the best solution.  Being a member of the EEG himself, Robinson decided to help make an open source implementation of the OSGi 4.2 Blueprint specification within the Apache Software Foundation that could be used in WAS 7.

The Blueprint component model came from the development of SpringSource's dmServer and was eventually standardized by the EEG on the OSGi Service Platform R4 V4.2.  The specification standardizes several unit test and simplification benefits enjoyed by the Spring Framework.

To build an implementation of the Blueprint spec (and implementations for other OSGi application technologies), the Apache Aries project was founded.  The project's implementation is currently being used in the recently launched Feature Pack for WAS 7.  It provides a component  model and an assembly model for modular applications.  This allows web applications to be deployed as versioned OSGi bundles.  Developers can also make bundle repositories in the provisioning infrastructure to host common bundles that reference many of the same libraries. 


The Aries implementation combines the Blueprint component with familiar Java EE technologies  Here are the main features of the OSGi applications support in the Feature Pack:

  • OSGi 4.2 Blueprint component model
  • Extensions to the Blueprint component model for declarative transactions, container-managed JPA and resource reference configuration
  • Module sharing between applications
  • Module versioning within and between applications
  • Isolated enterprise applications composed of multiple, versioned bundles with dynamic lifecycle
  • Module versioning within and between applications
  • Integrated administration of application bundles
  • Federation of lookup mechanisms between local JNDI and the OSGi service registry
  • Support for deploying existing WARs as web application bundles

The component model in the new feature pack also supports the deployment of bundled and non-bundled Java EE applications on the same server using a common administrative model.  Robinson further explained some of these features in his interview with DZone:  

"The [model] allows you to provide additional modularity capabilities that aren't present in a pure Java EE deployment model," said Robinson.  "We've enabled the application server to directly understand the applications deployed as OSGi bundles.  It will even understand, based on the metadata that you provide when you deploy your application, that the application you're deploying needs some other OSGi bundles."  Robinson says the application depends on these "other" bundles, but they aren't chosen by the developer to deploy as part of the OSGi application.  Instead the bundles are referenced from an OSGi bundle repository.  This gives you the ability to separate out common libraries that many applications share so that you don't have to re-deploy the libraries inside the enterprise archive.

Robinson and IBM don't want people to go back to the drawing board and redesign their applications in order to use them with OSGi.  The OSGi application support in the Feature Pack is "a natural progression," says Robinson, so that an existing web application can simply be deployed as one or more OSGi bundles without the tedium of recoding the application.

JPA 2.0

Along with OSGi application support, the Feature Pack also includes a JPA 2.0 Open Beta.  The WebSphere JPA implementation is based on Apache OpenJPA.  The Feature Pack includes OpenJPA's recent 2.0 implementation, which features improvements over prior versions of OpenJPA and more benefits than the basic JPA 2.0 specification.  The JPA 2.0 implementation in the feature pack includes several productivity improvements, JPQL extensions and enhancements, higher performance, and programmatic control of database access optimizations (Fetch groups, fetch plans, access intents).

WAS 7 users can grab the latest feature pack by following this link.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}