Jetty on OSGi - Servlet concurrency [message #503373] |
Sat, 12 December 2009 09:09  |
Eclipse User |
|
|
|
Hi,
I've sucessfully embedded Jetty as a servlet container. But there is a quite strange behaviour regarding Servlet concurrency. When creating a new Servlet, like this :
public class Servlet extends HttpServlet {
public int i = 0 ;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
resp.getWriter().println("i="+i);
i=i+1;
}
}
it appears that the member variable "i" continues to grow up each time I refresh my web page.
Is it a configuration problem or a correct behaviour ?
Then, do you know where I can find documentation explaining how Jetty inside Equinox handles threads ? It appears each time I'm trying to debugging, I'm still on the same thread . Launching conccurent accesses to the server leads to blocking situations where one page has to wait the end of the previous one to start.
Have you experienced something like this ? Can you please tell me if I missed something ?
Thanks for your help.
Sebastien
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04606 seconds