RAP running on OSGi
The example shows RAP running on OSGi. It consists of a RAP fontend and an RCP client, both sharing the same core plugin.
You can download the set of projects that form the example here (2.9 MB).
A brief overview of the content
Note that project names are without the leading org.eclipse.
- rap.example.core provides the data model of the example. It is shared by the RCP client and the RAP frontend.
- rap.example.rcp contains the RCP client (includes a launch configuration)
- The RAP frontend is provided by rap.example.ui. You can launch it with the OGGi Equinox launcher, a launch configuration is stored in plugin project. You can access the demo with http://localhost/W4TDelegate. Make sure that no other service is using port 80.
- The example.data project stores the data that both projects use. Note that a new session is needed (RCP == new launch / RAP == new browser session) to access data that has been changed by the other application.
- The rap.ui.workbench plugin contains the RAP specific extenstion point (startup form) and a wrapper servlet.
- rap.viewer contains our JFace like API (has been contributed to eclipse.org)
- rap.w4t is the widget toolkit - we had to make some tweaks to make it run with OSGi, as we do not have the standard webapp environment that we rely on. Those tweaks are not final, we will work that into the CVS with some improvements.
The remaining projects deal with the servlet environment and hosting it in the OSGi framework.
- The org.eclipse.equinox.http.registry provides the servlet extension point for rap.ui.workbench to register at.
- org.apache.commons.logging exports the packages from the commons-logging JAR that are required by equinox.jetty
- equinox.servlet.api contains the javax servlet related APIs.
- The equinox.servlet.bridge.http proxies through the servlet container to provide an OSGi HttpService. It is used by the jetty.http bundle.
- The equinox.jetty and equinox.jetty.http provide the HTTP service. We tweaked the equinox.jetty manifest, as it required servlet version 2.4. Moving to this servlet version would have required additional work which we wanted to avoid for now.
We are experimenting with a Tomcat based HTTP service, as Tomcat is already packaged with Eclipse and will contibute our work back to the incubator.
The screenshots below show the example in action