[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jetty-users] Jetty 8 + JAX-WS (Metro) Continuations
|
I'm trying to use embedded Jetty 8 with Metro. I'm using jaxws2spi to let
Jetty handle the endpoints, and then declaring the WS endpoints as servlets
in web.xml with the following servlet-class:
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
When I try to suspend a continuation with the usual:
Continuation continuation = ContinuationSupport.getContinuation(request);
continuation.suspend();
I get the following exception:
Jul 31, 2012 6:03:27 PM com.sun.xml.ws.server.sei.TieHandler createResponse
SEVERE: ASYNCSTARTED,initial
java.lang.IllegalStateException: ASYNCSTARTED,initial
at
org.eclipse.jetty.server.AsyncContinuation.doSuspend(AsyncContinuation.java:366)
at
org.eclipse.jetty.server.AsyncContinuation.suspend(AsyncContinuation.java:970)
...
I've attached the JAX-WS sources and discovered that the requests to
WSServlet wind up calling the following from
com.sun.xml.ws.transport.http.servlet.ServletAdapter:
if (asyncRequest) {
final javax.servlet.AsyncContext asyncContext =
request.startAsync(request, response);
This happens for every request immediately once it's been received (I
believe it hits WSServlet, then trickles down to this). With startAsync
already being called on the request, I believe that's why Jetty 8's
Continuation is failing. I don't know why JAX-WS is doing this, but it
basically breaks continuations, unfortunately.
I'm sure I'm not the only one using Jetty 8, Continuations, and Metro... do
I have a configuration problem here, maybe? Or maybe I actually am the only
one using a stack like this?
If anybody has any advice or tips for me, please share! Thanks!
--
View this message in context: http://jetty.4.n6.nabble.com/Jetty-8-JAX-WS-Metro-Continuations-tp4958894.html
Sent from the Jetty User mailing list archive at Nabble.com.