Triangle WebSphere User Group OSGi Hands On Lab with RAD for WebSphere Application Server

IBM RTP Client Briefing Center November 30, 2010

© 2009 IBM Corporation

November 30, 2010

Your Lab Hosts Tonight
 Nichole Stewart, WebSphere System Test    Lin Sun, WebSphere Development, Apache Aries    Ryan Boyles, WebSphere Technical Evangelist

Source: If applicable, describe source origin 2 © 2010 IBM Corporation

Deliver Innovative Applications Faster with WebSphere Application Server Feature Packs to Jump Start Development
Refresh 1Q10 New 3Q09 New Refresh 4Q09 4Q09 New 2Q10 New 2Q10 Beta 3Q10

EJB 3.0

Web 2.0

Web Services

Web 2.0




OSGi Apps Dynamic Modern & JPA 2.0 Scripting Batch

WAS V6.1

EJB 3.0

Web Services


 Adopt the latest technologies without disruptive upgrades  No additional charge: included in WAS PPA subscription  Reuse IBM open source contributions
3 © 2010 IBM Corporation

OSGi Background
 The OSGi Service Platform specifies a modular architecture for dynamic component based systems, using existing Java SE/EE specifications:  JTA, JPA, JNDI, JMX, WebApps… Java EE provides the core enterprise application programming model Adds Spring-derived component model and DI container Blueprint Apache “Aries” was created as a new Apache incubator project in Sep 2009 to provide Enterprise OSGi spec implementations Aries is a set of JEE components that have been fit into the OSGi model according to the Blueprint container specification. The OSGi framework that Aries runs in could be Equinox or Felix.

  


© 2010 IBM Corporation

OSGi Benefits

 Deploying modules as OSGi bundles
– Simplifies reuse between applications – Encourages (and enforces) modular design – Provides versioning – Enables dynamic module updates • Dependency Injection framework – Provides efficiency for large SOA systems dependencies injected publishes service consumes service

A static assembly and configuration of components (POJOs)

Blueprint managed bundle

Module Blueprint scoped by a bundle (one per bundle). Multiple <components /> per Module-Context

Source: Ian Robinson, Holly Cummins 5 © 2010 IBM Corporation

Comparing JEE applications to OSGi applications
JEE Archive EAR is Enterprise Application Archive JAR is Java Archive OSGi Bundle EBA is Enterprise Bundle Archive Bundle Likenesses Both use ZIP format and can be manipulated by JAR cmd. Both are Jar files and contain packages of Java classes. Differences File Extensions. Metadata. EBA contains no app code. Metadata. Classpath of Bundle dependencies. Versioning provided by Bundles. File extensions. (WAB is .jar) Metadata for Bundles.
© 2010 IBM Corporation

WAR is Web Application Archive

WAB is WebSphere Application Bundle

Both are ZIP format and can be manipulated by JAR cmd.


See full text at

OSGi Application Development Tools
WAS v7 OSGi FeP Test Environment

OSGi Application Support in RAD V8
 Provide integrated development and test of

Publish and Run
WAS v7 Server Support Blueprint Graphical Editor

OSGi Applications on the WebSphere platform

 Integrated with Web Tools, JEE productivity tools, and
Bundle Explorer SCA / OSGi Integration

Developer Productivity (e.g. content assist, validation, re-factoring)

other capabilities in RAD  Supports deployment to WAS v7 OSGi FeP and includes the FeP in the WAS Test Environment  SCA support for OSGi Applications  Additional OSGi tools:  Graphical and wiring editor for Blueprint  Bundle Explorer  Tools for WAS OSGi extensions / Valueadd

Graphical Application Editor

Tutorials and Documentation /application/index.html Free Eclipse Plugin for OSGi Applications
Graphical tools to develop OSGi applications and bundles  Includes features that increase developer productivity  Creates OSGi Applications for any Aries-based server runtime.  Eclipse WTP 3.6 (Helios) required

Graphical Creation Wizards WTP 3.6

Creation / Import / Export Tools PDE Eclipse

OSGi App Devt Tool
© 2010 IBM Corporation


Lab: Blog Sample – Featured App in Feature Pack

© 2010 IBM Corporation

Lab Downloads

 WebSphere Application Server for Developers 7.0 Download  WebSphere Feature Pack for OSGi and JPA2.0  RAD Standard Edition E 8.0 Download  Extra: Apache Aries samples


© 2010 IBM Corporation

Resources and References

 Apache Aries project for OSGi  Enterprise OSGi in Action presentation  WebSphere Emerge community  WebSphere Emerge blog  Triangle WebSphere User Group


© 2010 IBM Corporation


© 2009 IBM Corporation

WebSphere Application Server v7
Simplified Component Model
Based on Apache Aries, implements the OSGi Blueprint specification for dependency injection simplicity, including unit test of business components outside the server, but governed by OSGi standards and integrated with proven Java EE technologies.

Feature Pack for OSGi Applications and JPA 2.0
Efficient Application Deployment and Management
WebSphere Application Server v7 Web Application OSGi Blueprint Apache OpenJPA 2.0
Deploy OSGi applications and Web applications as OSGi bundles in the OBR increasing reuse, modularity, and decreasing application memory and disk footprint.

OSGi Bundle Repository

Persistence Layer Productivity
The IBM JPA 2.0 implementation, based on Apache OpenJPA, includes important standards based features to improve developer time to value plus additional performance APIs.

WebSphere eXtreme Scale

Data Studio pureQuery Runtime

IBM Portfolio Integration to Optimize Performance
Enhanced integration with IBM WebSphere eXtreme Scale and Data Studio pureQuery Runtime for enhanced performance, monitoring and easier diagnostics.

WAS Datasource

IBM DB2 and Informix Databases


© 2010 IBM Corporation

Highlights of OSGi application Support in WAS Feature Pack
 OSGi Release 4 Version 4.2 Blueprint component model for declarative assembly, and simplified unit test  Extensions to the Blueprint component model for declarative transactions, container-managed JPA, and resource reference configuration  Isolated enterprise applications composed of multiple, versioned bundles with dynamic life cycle  Integrated bundle repository and ability to configure the location of external repositories to support application provisioning  Module sharing between applications  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 Web Application Archives (WARs) as OSGi Web application bundles 

© 2010 IBM Corporation

JPA 2.0 Overview
 Object-relational persistence is a key developer requirement for many application developer scenarios. JPA is the Java EE standard for objectrelational persistence and was first introduced as part of Java EE 5. As part of the Java EE 6 standards, JPA 2.0 (JSR-317) updates object-relational capabilities with important developer APIs and enhancements.  Highlights of the JPA 2.0 implementation delivered in the feature pack include:
 Java EE 6, JPA 2.0 (Java Specification Request 317) specification compliant implementation  Important new JPA 2.0 standards-based features to help improve developer time to value  Achieve new levels of application performance with WebSphere Application Server V7  Query language (JPQL) extensions and improvements  Programmatic control of database access optimizations - fetch groups, fetch plans, and access intents  Enhanced integration with WebSphere eXtreme Scale in order to help improve data access performance


© 2010 IBM Corporation