This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet 3.0 startAsync + http pipeline
 
Similar Threads
AsyncContext timeout
ajax synchronicity?
Servlet 3.0 Async and Threads
Async Listener and Request/Response objects
Issue with Asynchronous Servlet: onStartAsync(AsyncEvent event) never called