On Thursday, June 02, 2011 5:55:04 AM Freeman Fang wrote: > Hi, > > To be clear, the stub you mentioned here is client side proxy, right? > > If so, then the client proxy is thread-safe in most cases, and it has > nothing to do with server side service, so you can use it in a multi- > threads environment without any problem. > > Only one scenario client proxy isn't threadsafe is that when you use > failover feature on client side, which means client proxy need change > conduit on the fly, but if your client proxy isn't in this case, it > won't affect you.
Actually, the primary scenario where they are not thread safe is use of the Request context. See the faq: http://cxf.apache.org/faq.html#FAQ-AreJAXWSclientproxiesthreadsafe%3F Dan > > Freeman > > On 2011-6-2, at 下午5:37, David L wrote: > > Hi all, > > > > Are CXF generated stubs thread-safe? > > If the web service is not thread-safe, then the stub can't be thread- > > safe. Do you agree? > > > > If the web service is thread-safe, is the CXF generated stub thread- > > safe? > > If the stub is used in a multi-threads environment, will this > > corrupts things like stub states, requests or responses? > > > > Best regards, > > > > David > > --------------------------------------------- > Freeman Fang > > FuseSource > Email:[email protected] > Web: fusesource.com > Twitter: freemanfang > Blog: http://freemanfang.blogspot.com > Connect at CamelOne May 24-26 > The Open Source Integration Conference -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
