Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-390

How to use Resteasy with Closeable apache httpclient

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.0.0.CR1
    • 7.0.0.DR4
    • Documentation
    • None
    • Documentation (Ref Guide, User Guide, etc.)

    Description

      Development guide is missing description how to use Resteasy with Closeable apache httpclient.
      The use case here is, that resteasy-client created with
      Client client = ClientBuilder.newClient();

      And this client throws TimeOutException, client is then not able to invoke any other requests to the server.
      The solution can be to create own apache Closeable httpclient and pass it to ResteasyClientBuilder:

      CloseableHttpClient httpClient = HttpClientBuilder.create()
                      .setDefaultRequestConfig(reqConfig)
                      .build();
      
      Client client = ResteasyClientBuilder().httpEngine(new ApacheHttpClient4Engine(httpClient, true)).build();  // RESTEasy specific
      

      This infomartion should be probably placed together within this chapter:
      http://docs.jboss.org/resteasy/docs/3.0.9.Final/userguide/html_single/index.html#transport_layer

      Attachments

        Issue Links

          Activity

            People

              dmichael@redhat.com David Michael (Inactive)
              kanovotn Katerina Odabasi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h