Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Clustering with Jetty and WADI

What is WADI?

WADI is an acronym of 'WADI Application Distribution Infrastructure'. WADI started life as a solution to the problems surrounding the distribution of state in clustered web tiers, but is becoming a more generalised distributed space service.


First, svn checkout jetty and then buid it by calling mvn install. Once it finishes, go to jetty.home/extras/wadi and mvn install that project. Besides compiling the java files and generating the jetty-wadi-session-manager jar file, this will copy all the dependencies into jetty.home/lib/wadi.

To cluster a webapp, you need to define the WadiSessionManager and create an instance of WadiSessionHandler (passing the WadiSessionManager object as a constructor parameter). Then set the WadiSessionHandler as your webapp's SessionHandler. You can do this in a context xml config file.


This context xml config file is readily usable. After building the jetty.home/extras/wadi project, drop this config file into the jetty.home/contexts directory.  You can create a node in the cluster by calling "java -Djetty.port=portnumber -jar start.jar etc/jetty.xml" in the jetty home directory (where nodename=a distinct node name for this node, and portnumber=a distinct port number for this node).

For instance, if you want to create a cluster with three nodes, you can do so by calling the following: 


Contact the core Jetty developers at
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery