Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » [ANN] IMPORTANT: Platform filters in RAP
[ANN] IMPORTANT: Platform filters in RAP [message #659238] Fri, 11 March 2011 15:42
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi RAP Community,

We'd like to inform you about an important change we made in RAP today:
In order to get rid of a weird hack that prevents installing RAP into the
IDE, we decided to use Equinox platform filters to resolve the issue in a
clean way. With this change, you'll may have to make a slight adjustment
to your environment (see below).

== Background ==

You know that we had some weird problems with the RAP Runtime being
installed into the IDE in the past. To avoid those problems, we used a
workaround that adds a fake dependency to the runtime feature. While
this dependency prevents installing the runtime into the IDE (which is
nonsense), it also prevents installing the runtime into a target platform
(which is the whole point of the runtime) if the checkbox "Include
required software" is checked. This workaround is clearly a hack and we
have been trying to find a clean solution. After talking to some Equinox
experts, we are now convinced that platform filters are the right
approach.

== How does it work? ==

By using platform filters, an OSGi bundle can express its compatibility
with a certain environment. In our case, we define a new window system
"rap" and change the runtime bundles to be compatible with this window
system only. With this change, no RAP runtime bundle can ever be started
in an RCP application, because there will always be another windowing
system (e.g. "win32", "gtk").

== What are the consequences? ==

As a consequence of this change, the window system *must* be set to "rap"
to run a RAP application from now on. This can be done either by adding
the Equinox parameter "-ws" or by setting the system property "osgi.ws".
When starting from the Eclipse IDE, the launcher usually sets this
parameter to ${target.ws} by default. Therefore it is sufficient to set
the "Windowing System" in your target platform to "rap" (this can be done
in the "Environment" tab).

If the window system is not set to "rap", then the RAP runtime bundles
will not be resolved. In this case, you'll end up with an error like the
following:

org.osgi.framework.BundleException: The bundle
"org.eclipse.rap.ui_1.4.0.qualifier [1]" could not be resolved. Reason:
Platform filter did not match: (osgi.ws=rap)

== Deployment ==

For WAR deployment, you'll need to add the "-ws rap" command line
parameter in your web.xml.

If you use RWT without OSGi, you don't have to change anything.

== Tool support ==

The RAP Tooling will provide support for this new requirement. When you
install the RAP target from the RAP welcome page, the target's window
system will automatically be set. If you create a target platform
manually, you'll have to set it yourself. The RAP launcher will now
display a warning if you forgot to do so. The WAR product tooling will
automatically insert the ws parameter into the web.xml of your WAR files.


These changes are effective by today and will be part of RAP 1.4 M6.
We hope that they won't cause too much distraction for RAP developers.

Best regards,
The RAP team

--
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:problem in selecting a particular date
Next Topic:Display#asynExec since 1.3.0-M7
Goto Forum:
  


Current Time: Mon Nov 29 20:33:29 GMT 2021

Powered by FUDForum. Page generated in 0.02211 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top