What's the difference between creating a new Client
instance using
ClientFactory
and ClientBuilder
in JAX-RS?
Asked
Active
Viewed 1,029 times
2

cassiomolin
- 124,154
- 35
- 280
- 359

RedPe4rl
- 185
- 1
- 2
- 10
1 Answers
2
The ClientFactory
class does not exist in the Client API, introduced in JAX-RS 2.0. Have a look at the javax.ws.rs.client
package.
The ClientFactory
class was present in the release candidates and milestones of the JAX-RS 2.0 specification, but was replaced with the ClientBuilder
class. For more details, you can check the old versions of the javax.ws.rs-api
artifact.
To create Client
instances, use ClientBuilder
:
Client client = ClientBuilder.newClient();

cassiomolin
- 124,154
- 35
- 280
- 359