You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Hannes Schubert <hs...@scoop-gmbh.de> on 2009/06/17 13:56:55 UTC

Jetty Continuation bound to client thread?

Hi all, 

with several examples I observed that a jetty continuation is bound to the
client thread, which initiated its instantiation. For example:

1. client thread invokes serviceMethod() first time

2. service impl gets a new continuation instance with state
new=true,pending=false,resumed=false
...something might happen inbetween, the reason why continuations are
used...

3. anyhow the continuation's resume() method is called, and thereby the
service impl is invoked a second time with same continuation instance and
state new=false,pending=true,resumed=true

4. client thread get's the result

5. same client thread submits a second call to the same serviceMethod()

6. service impl gets the same continuation instance with state
new=false,pending=false,resumed=false a second time

I tried to handle this state same as if it would be new. Interesting thing
is that second suspending succeeds, but after second resume a
com.ctc.wstx.exc.WstxEOFException: "Unexpected EOF in prolog" is thrown.
However, this does not happen, if step 5 is executed by another thread (see 
http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/continuations/
../systest/http_jetty/continuations/ ). In this case the service impl gets a
new continuation and all is happy...

So my questions are: what is the idea beyond it? After succeeded service
submission the client should be forgotten by the server... Why does the
server keep that continuation? Is it a Jetty issue? Or did I forgot
something?

Any hints are appreciated!

Best regards

Hannes
-- 
View this message in context: http://www.nabble.com/Jetty-Continuation-bound-to-client-thread--tp24071796p24071796.html
Sent from the cxf-user mailing list archive at Nabble.com.