You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by KramKroc <ma...@gmail.com> on 2012/11/25 00:58:18 UTC
CXF Continuations
Hi folks,
I'm looking for some advice or even a pointer to some sample code on use of
continuations within Camel.
What I'd really like to do is make use of something off the shelf but so far
I've only taken a quick look at Atmosphere but I've yet to figure out if
there is a way to use that in conjunction with either of the Jetty or
Servlet components and so I was wondering if maybe there is some good
examples of use of CXF continuations within Camel or some other way of
showing execution being paused and resumed on an external event?
I saw a quick post from Willem on the following ticket:
https://issues.apache.org/jira/browse/CXF-2982 but I think it is more
showing how he ensured that the CXF (& hopefully CXFRS) component made use
of continuations to free up threads when processing routes.
/KramKroc
--
View this message in context: http://camel.465427.n5.nabble.com/CXF-Continuations-tp5723192.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXF Continuations
Posted by Willem jiang <wi...@gmail.com>.
Hi Sergey,
Current camel-cxfrs is leverage the same continuation mechanism that CXF 'manages'.
I think the AsyncResponse could make the code more easier but it will not support the old version CXF any more.
--
Willem Jiang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: willemjiang
On Monday, November 26, 2012 at 9:51 PM, Sergey Beryozkin wrote:
> On 26/11/12 03:23, Willem jiang wrote:
> > When you use camel-cxfrs, or camel-cxf component, it is using CXF continuation by default.
> > You can go through the code to check out how we use it :)
>
>
> I wonder how how can a cxfrs consumer be enhanced to support JAX-RS 2.0
> suspended invocations (which are initialized when a given resource
> method has a javax.ws.rs.container.AsyncResponse parameter) ?
>
> With this style it is possible to get the same continuation
> reused/suspended many times, as opposed to a 'managed' continuation
> style currently supported by Camel where effectively only a single
> suspend for a given continuation thread is done, and which is resumed
> after a method returns ?
> At the moment it seems that by the time the AsyncResponse application
> code is finally ready to respond the Camel thread which was able to
> return a response to the client has gone to the end of the route...
>
> Sorry if I got it wrong...
>
>
> Sergey
Re: CXF Continuations
Posted by Sergey Beryozkin <sb...@gmail.com>.
On 26/11/12 03:23, Willem jiang wrote:
> When you use camel-cxfrs, or camel-cxf component, it is using CXF continuation by default.
> You can go through the code to check out how we use it :)
>
I wonder how how can a cxfrs consumer be enhanced to support JAX-RS 2.0
suspended invocations (which are initialized when a given resource
method has a javax.ws.rs.container.AsyncResponse parameter) ?
With this style it is possible to get the same continuation
reused/suspended many times, as opposed to a 'managed' continuation
style currently supported by Camel where effectively only a single
suspend for a given continuation thread is done, and which is resumed
after a method returns ?
At the moment it seems that by the time the AsyncResponse application
code is finally ready to respond the Camel thread which was able to
return a response to the client has gone to the end of the route...
Sorry if I got it wrong...
Sergey
>
Re: CXF Continuations
Posted by Willem jiang <wi...@gmail.com>.
When you use camel-cxfrs, or camel-cxf component, it is using CXF continuation by default.
You can go through the code to check out how we use it :)
--
Willem Jiang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: willemjiang
On Sunday, November 25, 2012 at 7:58 AM, KramKroc wrote:
> Hi folks,
>
> I'm looking for some advice or even a pointer to some sample code on use of
> continuations within Camel.
>
> What I'd really like to do is make use of something off the shelf but so far
> I've only taken a quick look at Atmosphere but I've yet to figure out if
> there is a way to use that in conjunction with either of the Jetty or
> Servlet components and so I was wondering if maybe there is some good
> examples of use of CXF continuations within Camel or some other way of
> showing execution being paused and resumed on an external event?
>
> I saw a quick post from Willem on the following ticket:
> https://issues.apache.org/jira/browse/CXF-2982 but I think it is more
> showing how he ensured that the CXF (& hopefully CXFRS) component made use
> of continuations to free up threads when processing routes.
>
> /KramKroc
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/CXF-Continuations-tp5723192.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
>