Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet 3.0 startAsync + http pipeline  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!