On Tuesday 02 March 2010 9:13:34 am ariekenb wrote:
> I'm trying to figure out which of the following are thread safe.
> 
> I was under the impression originally that separate JaxWsProxyFactoryBeans
> are independent from each other, but I started worrying that they are all
> using the same global BusFactory and things might try to be initialized at
> the same time.
> 
> I'm seeing intermittent exceptions when doing some of these things, so I'm
> thinking some of these things are not safe.
> 
> 1. Creating JaxWsProxyFactoryBeans for the same or different services in
> multiple threads.

This should be fine.

> 
> 2. Creating a JaxWsProxyFactoryBean at the same time a different thread is
> initializing a spring context containing a <jaxws:client> or
> <jaxws:endpoint>

This should also be fine, I think.  

> 3. Calling JaxWsProxyFactoryBean.create() on the same instance of a
> JaxWsProxyFactoryBean from multiple threads.

Probably not.   


> 4. Using one proxy created by JaxWsProxyFactoryBean.create() in multiple
> threads at the same time.

Yes, except for the stuff noted in the faq:
http://cxf.apache.org/faq.html#FAQ-AreJAXWSclientproxiesthreadsafe%253F

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to