-
Bug
-
Resolution: Done
-
Major
-
3.0.4.Final
-
None
-
Workaround Exists
-
This is very similar to RESTEASY-963 - but the solution given there did not work for this.
We have a system where a central server communicates with a multitude of remote servers using Resteasy to collate worldwide information. Quite often some of these remote servers will be down for whatever reason & we need to cope with this.
If a client invoke call fails due to server error and subsequently a call is made to build a Client, the client build will return a client with no error. But any attempt to then use that client will result in a "java.lang.IllegalStateException: Manager is shut down" exception.
Note that trapping the ResponseProcessingException and closing the Request (suggested as a solution for RESTEASY-963) does not fix this.
Re-using the same Client after a server error however works OK.
Attached is sample code; RestEasyRecovery1 re-uses the same Client after server failure and this works OK, RestEasyRecovery2 creates new Client each time and will fail after the call to the "bad server".