Hi, I'm very new to Jetty and have a simple server following their HelloWorld example using a SessionHandler. My class is called OrbVend and it extends SessionHandler. I have overridden doHandle and my main is as follows:
public static void main(String[] args) throws Exception
{
Server server = new Server(8999);
SessionIdManager idManager = new HashSessionIdManager();
SessionManager sessionManager = new HashSessionManager();
SessionHandler handler = new OrbVend(sessionManager);
server.setHandler(handler);
sessionManager.setIdManager(idManager);
sessionManager.setSessionHandler(handler);
server.start();
server.join();
}
I put a simple Thread.sleep in my doHandle and I try to hit the server with 2 requests at the same time. The second request does not even enter the doHandle method until the first one exits. I assume that this Jetty SessionHandler is backed by a Servlet and therefore can handle multiple requests simultaneously. Am I doing something wrong that is preventing this?