You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Canning, Charles" <cc...@stubhub.com> on 2015/06/22 21:51:50 UTC

Jax-rs 2 client with clustering/failover features?

Given your example code:

Client client = ClientBuilder.newBuilder().newClient();
WebTarget target = client.target("http://localhost:8080/rs");
target = target.path("service").queryParam("a", "avalue");

Invocation.Builder builder = target.request();
Response response = builder.get();
Book book = builder.get(Book.class);

Is there a way to configure the builder to use a failover strategy without having to code it directly for each client?

chuck

Re: Jax-rs 2 client with clustering/failover features?

Posted by Sergey Beryozkin <sb...@gmail.com>.
ClientBuilder accepts JAX-RS features (if you mean you'd like to set a 
given feature once and have it available for all Clients/WebTargets).

But 2.0 API is not integrated with CXF-specific features

Cheers, Sergey
On 22/06/15 20:51, Canning, Charles wrote:
> Given your example code:
>
> Client client = ClientBuilder.newBuilder().newClient();
> WebTarget target = client.target("http://localhost:8080/rs");
> target = target.path("service").queryParam("a", "avalue");
>
> Invocation.Builder builder = target.request();
> Response response = builder.get();
> Book book = builder.get(Book.class);
>
> Is there a way to configure the builder to use a failover strategy without having to code it directly for each client?
>
> chuck
>