WebSphere 7 Feature Pack Supports OSGi-based Application Deployment and SCA Integration
WebSphere Application Server V7 Feature Pack for OSGi Applications and Java Persistence API 2.0 offers a standards-based implementation of the OSGi Blueprint Container specification and Java EE 6 JPA 2.0. It also provides an optional feature to assemble, deploy and manage Java applications as a collection of versioned OSGi bundles. IBM WebSphere team recently announced the GA release of the feature pack which is based on Apache projects Aries and OpenJPA. A WebSphere Application Server Feature Pack is an optionally installable product extension for the application server, that provides a set of new related standards and features.
The new OSGi and JPA features, which can be installed independently or together, provide a POJO-based component model, a persistence framework and a modular deployment system for the development and unit testing of web applications. The OSGi application feature supports the development and deployment of enterprise applications in a modular fashion, introducing configurable OSGi bundle repositories into the WebSphere application deployment process. This enables common bundles to be factored out of individual enterprise application archives and managed centrally in a bundle repository. Multiple versions of bundles can be installed into the bundle repository and the appropriate version associated with individual enterprise applications according to metadata specified in those applications. The OSGi application feature includes an OSGi V4.2 Blueprint container integrated with the WAS runtime to simplify the development and configuration of simple POJO components and to provides a declarative mechanism for these beans to publish and consume OSGi services. The container, rather than the bean component, has the Java package dependencies on the OSGi framework and server runtime so the bean component can be unit tested outside a server environment. Development tools for OSGi applications are provided in the new Rational Application Developer (RAD) V8 Beta version.
RAD introduces new project types for OSGi Bundle projects and OSGi application projects, with automated generation of manifests and forms-based editors to modify them. OSGi modularity semantics are honored in the project build paths, providing an environment which supports a modular design. RAD's facet-based configuration enables OSGi projects to be configured as OSGi Web projects or OSGi JPA projects and integrates tools for authoring web.xml, persistence.xml and blueprint.xml. OSGi application projects can be imported from or exported to enterprise bundle archives, and can be run from the RAD workspace on the WebSphere Application Sever V7 optionally installed with RAD or a remote WAS V7 install that includes the OSGi application feature.
New JPA 2.0 standards-based features include the improvements to persistence domain modelling (e.g. through derived identities, support for embeddables), new Metamodel and Criteria APIs, entity bean validation, updates to JPQL and additional object/relational mapping metadata. JPA 2.0 provides for portable second-level cache integration and OpenJPA 2.0 will use WebSphere extremeScale, when available, as a level 2 cache in order to improve data access performance.
InfoQ caught up with Ian Robinson, a IBM Distinguished Engineer in WebSphere Architecture team, about the new feature pack release. He said that OSGi has been a part of IBM's strategy but it has been used mainly for the internal projects (like WebSphere and Eclipse). With the release of OSGi Enterprise version 4.2 and the role OSGi can play in enterprise application deployment space, it has become the main theme for deploying application modules as bundles to simplify the deployment process and support both the developers and IT operations staff. Ian recently wrote about the OSGi and SCA integration and the tooling support to start using these new features. The OSGi feature can be used in conjunction with WebSphere Application Server's Service Component Architecture (SCA) support when the WAS V7 Feature Pack for SCA v18.104.22.168 or later is installed. SCA provides an assembly model for composing heterogeneous components into coarse-grained composites which define external services and references for which different bindings can be configured. Through assembly into an SCA component, an OSGi application can remotely expose any of its Blueprint-configured OSGi services as SCA services and configure remote bindings for these services.
InfoQ: Can you explain how the OSGi Blueprint Container works and how it compares with other OSGi frameworks like SpringDM Project?
The Blueprint container is specified as part of OSGi Enterprise V4.2. It supports a fine-grained bean assembly model for OSGi applications as well as a simple declarative means to publish an OSGi service provided by a POJO bean component. The Blueprint container manages the lifecycle and dependency injection of POJO bean components and is configured through a bundle-level XML bean definition file which is the standards-based evolution of the SpringDM bean definition XML. There are a number of compliant Blueprint container implementations - for example there is one developed in the Apache Aries project (which is integrated with WAS when the OSGi application feature is installed) as well as the SpringDM project itself which VMWare have contributed to the Eclipse Gemini project. The Apache Aries Blueprint container is enhanced with a number of enterprise extensions including support for container-managed transactions and container-managed persistence contexts when the container is integrated into an enterprise environment such as WAS.
InfoQ: Can you discuss in more detail, the IBM enhancements made to OpenJPA 2.0 to integrate with WebSphere Application Server?
When the JPA feature is installed, the JPA 2.0 capabilities provided by OpenJPA 2.0 are available as part of the WebSphere Application Server runtime. As well as being integrated with WAS management, debugging, monitoring, and security the JPA 2.0 runtime is extended to integrate with the Data Studio pureQuery runtime (now called Optim pureQuery Runtime), when available. The PureQuery runtime is a high performance Java data access platform that helps manage applications that access data. PureQuery can introspect existing Java classes and gather up the SQL for binding into static packages without having to execute the application and can transparently leverage the benefits of DB2 static SQL execution. It gives DBAs the ability to optimize and lock down SQL without modifying the application and can provide the information necessary to quickly trace SQL back to its source.
InfoQ: What is the future road-map of WebSphere v7 OSGi and JPA Feature Pack in terms of new features and enhancements?
You can expect to see further enhancements to these features in the future, for example as new versions of the OSGi Enterprise specification are published. Since we are developing the underlying technology with wider communities in open source, a good insight into what you might expect to see integrated in WAS in the future can be gained by looking at the Apache OpenJPA and Aries projects.