Strange behaviour with @PathParam in the URI using javax.ws.rs.PathParam and Docker Swarm

Viewed 64

We got a strange problem with building URI with ResteasyClient. We have a REST API with url xy/z/{id} (e.g. xy/z/1) and a client app, which seems to use only one URI.

The first request is working without any issue. After that, the URI only uses the first parameter, regardless the called one. Seems like its cached somewhere, but we did not implement any cache method.

On my local environment its not a problem, only on pre-production environment, where we use docker swarm (3 nodes).

@Override
public void afterPropertiesSet() throws Exception {
    ResteasyClient client = new ResteasyClientBuilder().build();
    applicationContext.getBeansWithAnnotation(Provider.class).values().forEach(client::register);
    client.register(new LoggingFilter());
    client.register(JacksonJsonProvider.class);
    ResteasyWebTarget target = client.target(UriBuilder.fromPath(getServiceUrl()));
    postProcessClient(client);
    resource = target.proxy(resourceClass);
}

Could it be the proxy, that does not change the path parameter?

0 Answers
Related