Q:

org.glassfish.jersey.client. ClientProperties timeouts don't work on WildFly

I've got the following code for HTTP timeouts support:
    Client client = ClientBuilder.newClient().register(JacksonJsonProvider.class);
    client.property(ClientProperties. CONNECT_TIMEOUT, 1000);
    client.property(ClientProperties. READ_TIMEOUT, 1000);
    WebTarget target = client.target(url);
    Response response = target.request(MediaType. APPLICATION_JSON_TYPE).post(null, Response.class);

It works fine for standalone java application.  It  waits 1000ms for the response, then java.net. SocketTimeoutException occurs. 
I need to use this code on WildFly 8.2.0.  The problem is that after 1000ms of waiting nothing happens.  This code waits for infinite time.  I guess that ClientProperties. CONNECT_TIMEOUT and ClientProperties. READ_TIMEOUT are not suitable for WildFly.  Probably I have to use other constants.  Does anybody know what is the problem? 

A:

ClientProperties is a jersey specific class, its properties are jersey specific.   Wildfly uses RestEasy as its JAX-RS provider. 
You can configure the underlying Apache HttpClient here: https://docs.jboss.org/resteasy/docs/3.0.17.Final/userguide/html/RESTEasy_Client_Framework.html
To configure timeout in HttpClient: https://www.jayway.com/2009/03/17/configuring-timeout-with-apache-httpclient-40/

