selenium.waitForPageToLoad("5000");
}
private Jetty7Runner configureClusteredJetty(String name, int port) throws Exception
{
Jetty7Runner runner = new Jetty7Runner();
runner.configure("src/test/cluster", "", port, port + 100);
JDBCSessionIdManager idMgr = new JDBCSessionIdManager(runner.getServer());
idMgr.setWorkerName(name);
idMgr.setDriverInfo("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:clustertest");
Server server = runner.getServer();
server.setSessionIdManager(idMgr);
WebAppContext wac = (WebAppContext) server.getHandler();
JDBCSessionManager jdbcMgr = new JDBCSessionManager();
jdbcMgr.setIdManager(server.getSessionIdManager());
// force the session to be read from the database with no delay
// This is an incorrectly documented feature.
jdbcMgr.setSaveInterval(0);
wac.setSessionHandler(new SessionHandler(jdbcMgr));
wac.getServletContext().setInitParameter("cluster.name", name);
runner.start();
return runner;
}