Are JAX-WS clients thread safe?

前端 未结 1 346
离开以前
离开以前 2020-12-09 03:43

Because the initialization of the WS client side port is so costly we would like to reuse the same instance. We would also like to set different values in the BindingProvide

1条回答
  •  臣服心动
    2020-12-09 04:37

    For JAX-WS/Metro, that's definitely not thread safe. The best bet is to create a Pool of proxies and, when needed, pull a proxy from the pool, configure it, use it, clear the set values, return to the pool.

    Or use CXF.

    0 讨论(0)
提交回复
热议问题