Jetty 7 suspend() not suspending

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
ljw
Reply | Threaded
Open this post in threaded view
|

Jetty 7 suspend() not suspending

ljw
In the function below, the println() statement get executed immediately after the call to suspend(), even if resume is never called. Could someone explain why that is? I was following the example on Greg's blog. The code is executing in a GWT 1.5 RemoteServiceServlet which extends HttpServlet.

public class RequestServiceImpl extends RemoteServiceServlet implements RequestService {

public Response handleRequest(SimpleRequest request) {

        HttpServletRequest httpReq = getThreadLocalRequest();
-snip-
        httpReq.suspend();

        System.out.println("RquestServiceImpl got a resume");
        return consumer.getResponse(requestId);
    }
}

Also, possibly related, I'm getting this error in my Jetty process when the request is invoked.

2008-07-17 14:53:29.876:/gaming:WARN:  Exception while dispatching incoming RPC call
javax.servlet.ServletException: Client did not send 500 bytes as expected
        at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8(RPCServletUtils.java:154)

        at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:76)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:219)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:738)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:20
6)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:113)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:325)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:385)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
2008-07-17 14:53:29.892::WARN:  /gaming/RequestService
java.lang.IllegalStateException: STREAM
        at org.mortbay.jetty.Response.getWriter(Response.java:589)
        at com.google.gwt.user.server.rpc.RPCServletUtils.writeResponseForUnexpectedFailure(RPCServle
tUtils.java:261)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.doUnexpectedFailure(RemoteServiceServl
et.java:283)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:219)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:738)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:20
6)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:113)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:325)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:385)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)