Re: Continuations status?
On Tuesday, October 18, 2011 9:05:48 AM Kent Närling wrote: > Hi, > > What is the status of CXF continuations and where do I find the best > documentation on how to use it? > > Is the support for continuations usable for production? I see some > mentionings of beta status etc but that might be outdated? Likely outdated. It's definitely used heavily in Camel. I just spent the last week really pounding on this area in Camel so I know they work fairly well. In some cases "too well". :-) Seriously, I was running into major issues where due to the continuations, I was filling up all the workqueues all over the place and had thousands of requests outstanding. Quickly ran out of file handles/sockets. > Also, I tried to look for documentation how to use it but the best I found > was the "musings" on Sergey Beryozkin's blog from 2008, which is very brief? > Surely there must be something better with samples etc? > > Lastly, how good of an option IS continuations for writing eg a truly > asynchronous SOAP proxy (eg that gets SOAP requests and proxies into another > asynchronous protocol)? > I mean mainly for performance point of view? This is very similar to what I was trying to do with Camel and Camel is really a good option for this. (well, it WILL be with 2.8.2) You really can do from("cxf://").to("jms:...") and with the continuations that Camel uses, it should work quite well. I was doing pure SOAP -> SOAP proxying, but many of the ideas are the same. That said, current versions of Camel have major performance issue in this area. Should be fixed in the next version. Dan > Is there no truly message-based interface for SOAP processing? > > Best regards, > Kent -- Daniel Kulp dk...@apache.org http://dankulp.com/blog Talend - http://www.talend.com
Re: Continuations status?
On 18 October 2011 13:32, Daniel Kulp wrote: > > Hmmm... what you are doing should work. > > As an easy workaround, you can always call > PhaseInterceptorChain.getCurrentMessage() to get the current CXF Message > and > pull values from there. You would need to use the CXF Message.* keys > and > not the JAX-WS keys. > > If you want to stick with JAX-WS, you can just do: > > > WebServiceContext context = new > org.apache.cxf.jaxws.context.WebServiceContextImpl(); > > and use that. > Thanks, did this and it works! > > Dan > > > > On Tuesday, October 18, 2011 1:23:24 PM Kent Närling wrote: > > Hi, thanks for the quick answer, however: > > > > On 18 October 2011 12:52, Sergey Beryozkin wrote: > > > Hi, > > > > > > On 18/10/11 08:51, Kent Närling wrote: > > >> Also, another question: > > >> > > >> How do I get the Context without injection? > > >> > > >> We are currently not running our service in Spring, so we need to get > > >> the Context some other way... > > > > > > I'm presuming you are referring to JAX-WS WebServiceContext, given that > > > you mention SOAP... I think JAX-WS will just inject it into a private > > > field even without Spring being involved... Possible for JAX-RS too > > > > I tried both: > > > > private @Resource > > MessageContext context; > > > > and > > > > private @Resource > > WebServiceContext context; > > > > in the class implementing the @Webservice interface and both of the > fields > > are nulll... > > > > FYI we start our WS as a plain java process and use Endpoint.publich() > just > > to publish our endpoints... > > > > > Cheers, Sergey > > > > > >> On 18 October 2011 09:05, Kent > > >> Närling>>> > > >> wrote: > > >> > > >> Hi, > > >> > > >>> What is the status of CXF continuations and where do I find the best > > >>> documentation on how to use it? > > >>> > > >>> Is the support for continuations usable for production? I see some > > >>> mentionings of beta status etc but that might be outdated? > > >>> > > >>> Also, I tried to look for documentation how to use it but the best I > > >>> found > > >>> was the "musings" on Sergey Beryozkin's blog from 2008, which is > > >>> very > > >>> brief? > > >>> Surely there must be something better with samples etc? > > >>> > > >>> Lastly, how good of an option IS continuations for writing eg a > > >>> truly > > >>> asynchronous SOAP proxy (eg that gets SOAP requests and proxies into > > >>> another > > >>> asynchronous protocol)? > > >>> I mean mainly for performance point of view? > > >>> > > >>> Is there no truly message-based interface for SOAP processing? > > >>> > > >>> Best regards, > > >>> Kent > -- > Daniel Kulp > dk...@apache.org > http://dankulp.com/blog > Talend - http://www.talend.com >
Re: Continuations status?
Hmmm... what you are doing should work. As an easy workaround, you can always call PhaseInterceptorChain.getCurrentMessage() to get the current CXF Message and pull values from there. You would need to use the CXF Message.* keys and not the JAX-WS keys. If you want to stick with JAX-WS, you can just do: WebServiceContext context = new org.apache.cxf.jaxws.context.WebServiceContextImpl(); and use that. Dan On Tuesday, October 18, 2011 1:23:24 PM Kent Närling wrote: > Hi, thanks for the quick answer, however: > > On 18 October 2011 12:52, Sergey Beryozkin wrote: > > Hi, > > > > On 18/10/11 08:51, Kent Närling wrote: > >> Also, another question: > >> > >> How do I get the Context without injection? > >> > >> We are currently not running our service in Spring, so we need to get > >> the Context some other way... > > > > I'm presuming you are referring to JAX-WS WebServiceContext, given that > > you mention SOAP... I think JAX-WS will just inject it into a private > > field even without Spring being involved... Possible for JAX-RS too > > I tried both: > > private @Resource > MessageContext context; > > and > > private @Resource > WebServiceContext context; > > in the class implementing the @Webservice interface and both of the fields > are nulll... > > FYI we start our WS as a plain java process and use Endpoint.publich() just > to publish our endpoints... > > > Cheers, Sergey > > > >> On 18 October 2011 09:05, Kent > >> Närling>>> > >> wrote: > >> > >> Hi, > >> > >>> What is the status of CXF continuations and where do I find the best > >>> documentation on how to use it? > >>> > >>> Is the support for continuations usable for production? I see some > >>> mentionings of beta status etc but that might be outdated? > >>> > >>> Also, I tried to look for documentation how to use it but the best I > >>> found > >>> was the "musings" on Sergey Beryozkin's blog from 2008, which is > >>> very > >>> brief? > >>> Surely there must be something better with samples etc? > >>> > >>> Lastly, how good of an option IS continuations for writing eg a > >>> truly > >>> asynchronous SOAP proxy (eg that gets SOAP requests and proxies into > >>> another > >>> asynchronous protocol)? > >>> I mean mainly for performance point of view? > >>> > >>> Is there no truly message-based interface for SOAP processing? > >>> > >>> Best regards, > >>> Kent -- Daniel Kulp dk...@apache.org http://dankulp.com/blog Talend - http://www.talend.com
Re: Continuations status?
Hi, thanks for the quick answer, however: On 18 October 2011 12:52, Sergey Beryozkin wrote: > Hi, > > On 18/10/11 08:51, Kent Närling wrote: > >> Also, another question: >> >> How do I get the Context without injection? >> >> We are currently not running our service in Spring, so we need to get the >> Context some other way... >> >> > I'm presuming you are referring to JAX-WS WebServiceContext, given that you > mention SOAP... I think JAX-WS will just inject it into a private field even > without Spring being involved... Possible for JAX-RS too > I tried both: private @Resource MessageContext context; and private @Resource WebServiceContext context; in the class implementing the @Webservice interface and both of the fields are nulll... FYI we start our WS as a plain java process and use Endpoint.publich() just to publish our endpoints... > > Cheers, Sergey > > > >> >> On 18 October 2011 09:05, Kent >> Närling> >> wrote: >> >> Hi, >>> >>> What is the status of CXF continuations and where do I find the best >>> documentation on how to use it? >>> >>> Is the support for continuations usable for production? I see some >>> mentionings of beta status etc but that might be outdated? >>> >>> Also, I tried to look for documentation how to use it but the best I >>> found >>> was the "musings" on Sergey Beryozkin's blog from 2008, which is very >>> brief? >>> Surely there must be something better with samples etc? >>> >>> Lastly, how good of an option IS continuations for writing eg a truly >>> asynchronous SOAP proxy (eg that gets SOAP requests and proxies into >>> another >>> asynchronous protocol)? >>> I mean mainly for performance point of view? >>> >>> Is there no truly message-based interface for SOAP processing? >>> >>> Best regards, >>> Kent >>> >>> >> >
Re: Continuations status?
Hi, On 18/10/11 08:51, Kent Närling wrote: Also, another question: How do I get the Context without injection? We are currently not running our service in Spring, so we need to get the Context some other way... I'm presuming you are referring to JAX-WS WebServiceContext, given that you mention SOAP... I think JAX-WS will just inject it into a private field even without Spring being involved... Possible for JAX-RS too Cheers, Sergey On 18 October 2011 09:05, Kent Närling wrote: Hi, What is the status of CXF continuations and where do I find the best documentation on how to use it? Is the support for continuations usable for production? I see some mentionings of beta status etc but that might be outdated? Also, I tried to look for documentation how to use it but the best I found was the "musings" on Sergey Beryozkin's blog from 2008, which is very brief? Surely there must be something better with samples etc? Lastly, how good of an option IS continuations for writing eg a truly asynchronous SOAP proxy (eg that gets SOAP requests and proxies into another asynchronous protocol)? I mean mainly for performance point of view? Is there no truly message-based interface for SOAP processing? Best regards, Kent
Re: Continuations status?
Hi As far as I'm aware CXF continuations are used in the Camel and ServiceMix integration layers. I haven't heard users explicitly using continuations in their own applications but the continuations support has definitely been improved over the last couple of years, I think it's very much 'alive', but I agree that having good docs would be nice. I think the only main change which happened is that continuation.suspend() does not throw an exception, an explicit 'return' has to be added... Cheers, Sergey On 18/10/11 08:05, Kent Närling wrote: Hi, What is the status of CXF continuations and where do I find the best documentation on how to use it? Is the support for continuations usable for production? I see some mentionings of beta status etc but that might be outdated? Also, I tried to look for documentation how to use it but the best I found was the "musings" on Sergey Beryozkin's blog from 2008, which is very brief? Surely there must be something better with samples etc? Lastly, how good of an option IS continuations for writing eg a truly asynchronous SOAP proxy (eg that gets SOAP requests and proxies into another asynchronous protocol)? I mean mainly for performance point of view? Is there no truly message-based interface for SOAP processing? Best regards, Kent
Re: Continuations status?
Also, another question: How do I get the Context without injection? We are currently not running our service in Spring, so we need to get the Context some other way... On 18 October 2011 09:05, Kent Närling wrote: > Hi, > > What is the status of CXF continuations and where do I find the best > documentation on how to use it? > > Is the support for continuations usable for production? I see some > mentionings of beta status etc but that might be outdated? > > Also, I tried to look for documentation how to use it but the best I found > was the "musings" on Sergey Beryozkin's blog from 2008, which is very brief? > Surely there must be something better with samples etc? > > Lastly, how good of an option IS continuations for writing eg a truly > asynchronous SOAP proxy (eg that gets SOAP requests and proxies into another > asynchronous protocol)? > I mean mainly for performance point of view? > > Is there no truly message-based interface for SOAP processing? > > Best regards, > Kent >