File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes servlet 3.0 startAsync + http pipeline Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet 3.0 startAsync + http pipeline" Watch "servlet 3.0 startAsync + http pipeline" New topic
Author

servlet 3.0 startAsync + http pipeline

kunal ekawde
Greenhorn

Joined: Dec 08, 2009
Posts: 1
I tried with servlet 3.0 on latest Glassfish v3.
On every GET, I start a Timer (5 sec) and on timer expiry call asyncCtx.complete().
It works fine with Req1-Rsp1 but doesn't seem to work on Req1,Req2 on same TCP connection (pipeline) and startAsync throws 'java.lang.IllegalStateException: startAsync already called' .

on doGET()


in run() for timer



As per startAsync:'Subsequent invocations of this method, or its overloaded variant, will return the same AsyncContext instance, reinitialized as appropriate. '

Is it expected behavior or I'm missing something?


~Kunal
 
Don't get me started about those stupid light bulbs.
 
subject: servlet 3.0 startAsync + http pipeline