On Fri June 12 2009 11:06:51 am Hannes Schubert wrote:
> Hi all,
>
> I read a lot of postings about asynchronous request processing on the
> server site including jira-1835, jetty continuations, mixservices and so
> on...
>
> Still I am puzzeling about the following issue:
> if I look at the 2.2.1 cxf source code I determine that the
> ServiceInvokerInterceptor invokes the SEI synchronously and all succeeding
> interceptors are processed sequentially by PhaseInterceptorChain. Is it
> true that actually there is no way to suspend the current web service
> processing (e.g. because of waiting on much too slow database) and let the
> thread resume with another chain from any other concurrent request?
With 2.2.1, you can IF you are using either JMS or Jetty standalone. There
isn't a way with the Servlet based transport. From the WebServiceContext,
you can call:
ContinuationProvider provider =
(ContinuationProvider)context.getMessageContext().get(ContinuationProvider.class.getName());
which will get the ContinuationProvider. For Jetty standalone, that would
wrapper the Jetty continuations stuff. For JMS, it will use an
implementation specific for JMS.
You can see it working for some of our system tests:
http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/continuations/
http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/continuations/
Hope that helps!
--
Daniel Kulp
[email protected]
http://www.dankulp.com/blog