> -----Original Message----- > From: KARR, DAVID > Sent: Wednesday, April 05, 2017 12:27 PM > To: [email protected] > Subject: Verifying threadsafety of cached javax.ws.rs.client.Client > implementation with basic auth in CXF & 404 in docs > > I'm likely going to be implementing a REST service call using > ClientBuilder, and it will require basic auth. I'm intending to cache > the Client object, if I can be sure it's thread-safe.
Slight correction: this is going to require 2-way cert auth, not basic auth. > I'm having trouble getting a clear picture on some of these details from > the main docs. I found the section about using ClientBuilder > (https://urldefense.proofpoint.com/v2/url?u=http- > 3A__cxf.apache.org_docs_jax-2Drs-2Dclient-2Dapi.html&d=DwIFAg&c=LFYZ- > o9_HUMeMTSQicvjIg&r=OsTemSXEn- > xy2uk0vYF_EA&m=yD0wxSnRASYOtn5y9X8bW4S5ob5E8WHX2C84AFt4ATQ&s=bIClm6sfaNO > KqAtPUKTW6E-mJyd8zEp3DdstKS98Hbg&e= ), but that doesn't mention auth. > When I searched for "basic" on the same page, I found some references to > doing this with a WebClient, but I'm not sure of the relevance of that. > I also can't find a statement about thread-safety. I understand that > Client is an interface, but CXF is providing an implementation, so I > would assume it's possible to determine that. > > I note that links to "JAXRSClientFactoryBean" on that page get a 404. I > have a feeling that class is relevant to this. I also don't see this > class in the standard Javadoc set.
