Skip to main content
Jump to: navigation, search

RAP/RWT Cluster

Revision as of 09:56, 5 June 2011 by (Talk | contribs) (State of Development)

| RAP wiki home | RAP project home |

Support for Transparent Session Failover in RWT is work in progress and details outlined below may change without prior notice

Load balancing

Load balancing to distribute workload across multiple nodes in a cluster works with RAP out of the box since version 1.0.

One thing to mind though when setting up a load balancer for RAP applications is that it must be configured to use stcky sessoins (aka session affinity). This entails that once a session is started, the same server serves all requests for that session.

For information on how to set up load balancing, refer to the servlet container documentation. E.g. Tomcat

Transparent Session Failover

We are currently working to make transparent session failover possible for RAP applications. Two or more servlet engines that form a cluster, where a session, and its contents, can be moved from any node of the cluster to a different node.

In §7.7.2 (Distributed Environments), the servlet specification requests for distributable aplications that all session data must implement the Serializable interface. This results in two main abstacles to overcome with the current implementation:

  • All RWT objects that live in the session scope must be serializable. This will mainly affect Display, Widget and its derived classes and Resource and derived classes.
  • The RWTLifeCycle which creates a UI Thread that lives until the session is terminated and so ensures compatibility with SWT. The UI thread is necessary to enable blocking dialogs. The downside of the UI thread of course is that sessions cannot be migeated as - naturally - a thread cannot be serialized.

Serializable RWT sessions can also be used to swap inactive sessions onto disk and thereby releasing the memory consumed by them. This feature is e.g. supported by Tomcat

State of Development

Bug bug 341761 is used to track progress of the solution.


In order to run an RWT application in a cluster configuration, an additional servlet filter must be registered. The web.xml should look like the one below:

 <?xml version="1.0" encoding="UTF-8"?>
 <web-app version="2.4" 
     <param-value> the class name of your entry point goes here </param-value>

In addition a different life cycle must be selected. To do so, set the lifecycle system property to org.eclipse.rwt.internal.lifecycle.SimpleLifeCycle

Development Snapshots

Development takes place in HEAD, if you are interested you may want to directly check out the source from the source code repository. To run the tests you will have to add Jetty 7.4 and the H2 embedded database (version 1.1) to your target platform.

Nightly builds are also available and can be downloaded from the build server.


We plan to ship the first version with milestone 1 of RAP 1.5 which will be available end of August 2011.

Back to the top