On Wed, Aug 9, 2023 at 1:56 AM Zsolt Melich <stocek86@gmail.com> wrote:
Hi Wei Nan,

Yeah, I have tried the latest Rest Easy version, and unfortunately it somehow broke the code (The client didn't start at all.)
Maybe I'll give it another try later or I'll try version 5.x.x.

Do you use the MicroProfile REST Client or Spring? Those were moved to new projects in 5.x. They can still be used, they just have different Maven GAV's now is all.
 

Please check the updates I sent in my reply to James. :) 

Regards,
Zsolt Melich


Wei Nan Li <weli@redhat.com> ezt írta (időpont: 2023. aug. 7., H, 14:19):
Hi Zsolt,

The RESTEasy Client uses the Apache HTTP Client in the underlying, so
the behavior may also be affected by the Apache HTTP Client version it
uses. Have you tried to use the  RESTEasy 6.x client? In addition,
creating a simplified sample project to see the project on Github
would be helpful to investigate the problem :-)

On Mon, Aug 7, 2023 at 8:01 PM Zsolt Melich <stocek86@gmail.com> wrote:
>
> Hi all!
>
> I'm facing with the error message in the subject since I had to switch from RestEasy v3.0.18 (I know, quite old) to v4.7.9.
> We have a great, complex IVR application (written in Java 8), what is using RestEasy for the WS client we have for the API calls throughout a calls. The application is deployed to a Tomcat 9 application server.
>
> The current version of the client creates a RestEasy client instance for each API invocation, then close the response and the client (with the close() method). This is quite expensive, so I planned to change this when I switch to v4.7.9.
> In the new version I create the client at the beginning, closing the response (to let the resource back to the pool) after each invocation, and shut down the client with close() at the very end (only once).
> We create the PoolingHttpClientConnectionManager instance, the engine instance (ApacheHttpClient43Engine) and the httpClient instance manually, then we pass the engine to the ClientBuilder to create the client instance.
>
> The problem is that I can make only one IVR test call without any issue. At the very end of the first call, the connection is being closed. In the second call I got the exception from the subject for the very first API call.
> I checked the logs, traced my test calls and everything is looking fine (the app does not close the connection before the invocation). After a Tomcat restart I'm able to do a successful test call again, but only for one time! After a successful call, I'm getting the same exception in the next call...
>
> Does the close() method of the client instance destroy the whole connection pool for later calls as well when I close the connection at the end of the first call? Is this normal?
> We didn't have this issue with v.3.0.18.
>
> P.S. : I know I haven't provided any exact code yet, but I try to clarify and understand the mechanics first.
>
> Thanks for the helping replies in advance!
> _______________________________________________
> resteasy mailing list -- resteasy@lists.jboss.org
> To unsubscribe send an email to resteasy-leave@lists.jboss.org
> Privacy Statement: https://www.redhat.com/en/about/privacy-policy
> List Archives: https://lists.jboss.org/archives/list/resteasy@lists.jboss.org/message/WAOAZJ7DAV2HSF6MQ4QEI3NTTXANXWWZ/



--
Cheers,
Wei Nan | JBoss

_______________________________________________
resteasy mailing list -- resteasy@lists.jboss.org
To unsubscribe send an email to resteasy-leave@lists.jboss.org
Privacy Statement: https://www.redhat.com/en/about/privacy-policy
List Archives: https://lists.jboss.org/archives/list/resteasy@lists.jboss.org/message/LSQSCJOTUEQGS7X3RGZML3U24W3BVMAT/


--
James R. Perkins
JBoss by Red Hat