I'm using CXF to generate SOAP client classes. In the CXF documentation, they write
Are JAX-WS client proxies thread safe?
Official JAX-WS answer: No. According to the JAX-WS spec, the client proxies are NOT thread safe. To write portable code, you should treat them as non-thread safe and synchronize access or use a pool of instances or similar.
CXF answer: CXF proxies are thread safe for MANY use cases. The exceptions are:
(I'm omitting their description of these use cases)
For most "simple" use cases, you can use CXF proxies on multiple threads. The above outlines the workarounds for the others.
Does anyone have any contrary experiences? Encountered multi-threading issues that aren't described in their faq? Or is their description accurate and they are basically safe to use?
We recently ran into similar discussion in our project. As specified in the FAQ you are referring to, except for the features that modify HTTP conduit on the fly (ex: session management and failover features), the CXF client proxy is thread safe. So if you do not use these features then it is okay to share the client proxy between threads.