2

I used to use the JAX-WS to generate client stubs. However, I learned recently that JAX-WS is not thread-safe and that Apache CXF is thread safe. I've read about it here. Creating a new instance of proxy each time it is needed is not an options because the proxies takes a long time to create. Also, I have no background with Apache CXF.

  • Which do you think is better when making client stubs considering the thread safety issue? Is it Apache CXF or JAX-WS? Why is it better?
  • What are the differences and similarities of the 2 that I should consider?
  • Should I use Apache CXF and give in to its thread safe feature instead of using JAX-WS? This is considering that the volume of users will most likely be hundreds of thousands.
  • Other option that was suggested to me is to use JAX-WS and create a pool of proxies instead. I'm somewhat hesistant with this solution given the possible volume of users. Is this a good solution?
  • Is there any other way to make the proxies in JAX-WS thread safe?
Paulius Matulionis
  • 23,085
  • 22
  • 103
  • 143
Arci
  • 6,647
  • 20
  • 70
  • 98
  • Too many questions encapsulated. – subodh Feb 27 '13 at 09:52
  • @subodh: I modified my question to make it more clear. Maybe my question will sum up to which of the 2 is better to use for clients considering that JAXWS is not thread-safe. The other questions are to make me understand the answer more. – Arci Feb 27 '13 at 10:03
  • 1
    see another answer [here](http://stackoverflow.com/questions/13136167/are-cxf-client-proxies-thread-safe) – yohlulz Feb 27 '13 at 10:37
  • @Ovidiu: Hi Ovidiu! Thanks for the link! I know CXF is thread-safe but my question is it is worth it to used CXF instead of JAXWS just to resolve the thread-safe issue? Or is there anything that can be done to make JAXWS thread-safe? – Arci Feb 28 '13 at 01:36
  • @Arci Sorry about the delay. As you know CXF is an implementation of JAX-WS so the thread-safety issue is much better addressed than you would address it in a short time. – yohlulz Mar 01 '13 at 17:15
  • @yohlulz: Thanks for your answer! Yes, I also realize that. I'm currently studying how to use CXF. Is there any significant difference in terms of performance if I use CXF instead of JAXWS? I'm just concern if CXF has any issue with its client since I'm not yet familiar of CXF. – Arci Mar 04 '13 at 07:34

0 Answers0