RAP/Running RAP on WebSphere

From Eclipsepedia

< RAP
Revision as of 15:54, 9 October 2011 by Ralf.zahn.ars.de (Talk | contribs)

Jump to: navigation, search

On IBM WebSphere Application Server (since V8, V7 with OSGi FEP), you do not have to install your RAP application using the bridge.war file. WAS provides an OSGi platform to Java EE applications to use OSGi's resolver mechanism and service dynamic. This platform is based on the Equinox OSGi implementation, but does not support Equinox-specific functionality like Extension Points. WAS implements the OSGi Enterprise WAB und BluePrint specification.

It is helpful to use IBM Rational Application Developer V8 with OSGi tools installed or to install IBM OSGi tools into Eclipse and to create EBA/WAB/OSGi bundle projects. But you can also create the bundles with simple file editors and a ZIP tool.

To deploy RWT on RAP, you have to do the following steps:

1. Create a WAB (WAR with OSGi bundle headers) and register the Equinox HttpService Servlet using the /* URL mapping. You can find this WAB here.

2. Create an EBA (EAR with OSGi bundle headers) file with the META-INF/APPLICATION.MF file. This file should look like this for a simple RWT application with the bundle identifier org.eclipse.rap.rwt.demo.bundle:
Application-Name: org.eclipse.rap.rwt.demo.eba
Application-SymbolicName: org.eclipse.rap.rwt.demo.eba
Application-ManifestVersion: 1.0
Application-Version: 1.0.0.qualifier
Manifest-Version: 1.0
Application-Content: org.eclipse.equinox.http.embedded.web;version=1.0.0,
 org.eclipse.rap.rwt.demo.bundle;version=1.0.0,
 org.eclipse.rap.rwt;version=1.5.0,
 org.eclipse.rap.rwt.osgi;version=1.5.0,
 org.eclipse.equinox.http.servlet;version=1.1.300,
 org.eclipse.osgi.services;version=3.3.0

If you want to use JFace, you have to add some bundles from the Eclipse runtime. Please note that WAS8 currently provides the org.eclipse.osgi bundle version 3.6.0, so you need to use the Eclipse 3.6 runtime bundles. Although RAP 1.5 is packaged with the Eclipse 3.8 platform, RAP and JFace can be used with Eclipse 3.6.

Application-Name: org.eclipse.rap.rwt.demo.eba
Application-SymbolicName: org.eclipse.rap.rwt.demo.eba
Application-ManifestVersion: 1.0
Application-Version: 1.0.0.qualifier
Manifest-Version: 1.0
Application-Content: org.eclipse.equinox.http.embedded.web;version=1.0.0,
 org.eclipse.rap.rwt.demo.bundle;version=1.0.0,
 org.eclipse.rap.rwt;version=1.5.0,
 org.eclipse.rap.rwt.osgi;version=1.5.0,
 org.eclipse.equinox.http.servlet;version=1.1.300,
 org.eclipse.osgi.services;version=3.3.0,
 com.ibm.icu.base;version=4.2.1,
 org.eclipse.core.commands;version=3.6.0,
 org.eclipse.core.databinding;version=1.3.100,
 org.eclipse.core.databinding.observable;version=1.3.0,
 org.eclipse.core.databinding.property;version=1.3.0,
 org.eclipse.equinox.common;version=3.6.0,
 org.eclipse.rap.jface;version=1.5.0,
 org.eclipse.rap.jface.databinding;version=1.5.0

3. Package the named bundles into the EBA or use WebSphere's internal and external bundle repositories to provide the bundles.

4. Install the EBAto WebSphere Application Server.