tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Kildén <karl.kil...@gmail.com>
Subject Thread Safety with javax.ws.rs.client.Client and CDI
Date Tue, 25 Oct 2016 07:17:20 GMT
Hello!

I read about it but I would just like to make sure...
http://cxf.apache.org/docs/jax-rs-client-api.html#JAX-RSClientAPI-ThreadSafety
http://cxf.apache.org/faq.html#FAQ-AreJAX-WSclientproxiesthreadsafe

If I have a CDI @ApplicationScoped bean called Fetcher that creates the
Client in @PostConstruct. When I use the Fetcher from multiple threads the
Client instance itself will not be a CDI proxy (All though maybe CXF has
some kind of proxy impl).

Is this safe/ good practice? Perhaps I should produce a single
@ApplicationScoped Client for all my Fetchers if it indeed is thread safe...

Any advice would be great

Cheers

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message