ServerSideSession session = null;
try {
// init session
session = getServer().createSession(cap);
if (session == null) {
throw new ServerIsShutingDownException(
"The server is currently shutting down and doesn't accept new tests.");
}
// start session
session.start(timeOut);