I've narrowed to the simplest async servlet example I could. Have run this on
linux, windows, inside netbeans and without netbeans. Using the latest
netbeans and glassfish as of today. The repro is to open more than six tabs
on a browser all going to the servlet. The seventh and subsequent will just
hang. Of course I want async for my chat app so I can have lots of users at
once, but lots is more than six, and wouldn't this example need to work first
before I go forward re-implementing my chat app with servlet 3.0? Of course
I'm probably missing something basic, but I've sure tried hard on this for a
while. Here's the servlet...
@WebServlet(name = "NIONotWorking", urlPatterns = {"/"}, asyncSupported =
true)
public class NIONotWorking extends HttpServlet {
public void service(ServletRequest req, final ServletResponse res) throws
ServletException, IOException {
System.out.println("top of service: " +
((HttpServletRequest) req).getRequestURL() +
"/" +
((HttpServletRequest) req).getQueryString());
req.startAsync();
}
}
so if you open each of these in a separate browser tab you should see the
funk! The different URIs are just to show each request in the printouts.
http://locahost:8080/1
http://locahost:8080/2
http://locahost:8080/3
http://locahost:8080/4
http://locahost:8080/5
http://locahost:8080/6
http://locahost:8080/7
http://locahost:8080/8
makes sense? let me know I would be happy to clarify. and help on this would
be soooooooooo appreciated (obviously a newbie attitude, oh well it's my
first post here)
--
[Message sent by forum member 'jayhurley']
View Post: http://forums.java.net/node/816649