Hi,

I'm new to Apache CXF and am trying to find a definitive answer for how to use 
Apache CXF clients with Spring in a multi-threaded environment.

I've seen several types of examples and implementations but it's not clear to 
me what is supposed to work and what is not supposed to work in a 
multi-threaded environment.

I've seen implementations where there is 1 JaxWsProxyFactoryBean and each 
thread that needs a client calls 'factory.create()'. That assumes that the 
factory is thread-safe when it comes to creating clients. Is this approach 
correct?

Other implementations I've seen use 1 client across all threads. And I'm pretty 
sure that is not thread safe. Correct?

And I've seen implementations where each thread creates its own 
JaxWsProxyFactoryBean and then uses it to create its own client. That of course 
is 'thread safe' since nothing is shared between threads but won't perform well 
probably.

Can somebody provide a definitive answer? I'm using CXF 2.1.8.

Thanks.

Henk

Reply via email to