-
1. Re: Scalability in CXF
ffang Jan 22, 2011 10:40 PM (in response to marim)Hi,
Sounds like you need use async camel-cxf endpoint which use cxf continuation api underlying.
Which camel version you're using?
Freeman
-
2. Re: Scalability in CXF
njiang Jan 23, 2011 2:21 AM (in response to marim)camel-cxf is based on the cxf runtime and CXF supports the async invocation out of box.
If you are using CXF Jetty Http transport, you can leverage the continuation to prepare the response message without blocking the underlay transport thread.
But if you are using other transport, such as Servlet transport, you need to check if the web container has this kind function.
Willem
-
3. Re: Scalability in CXF
marim Jun 29, 2011 12:10 PM (in response to marim)It took quite a long time since first post but I have got another question about async invocations in cxf and camel.
My app take a long time to return so connection can fail/timeout before response is ready. Is there any way to detect that connection has been closed?
I am using camel-cxf approach with
(...)
.process(new AsyncProcessor(){
public boolean process(Exchange exchange, AsyncCallback callback) {
(...)
return false;
}}
there are methods like:
exchange.isFailed() - but it always returns false even when I close connection on the second side
similiar here:
exchange.addOnCompletion(new Synchronization() {
public void onFailure(Exchange exchange) {
// never
}
public void onComplete(Exchange exchange) {
// always
}
});