WLS-On SocketTimeoutException connection.getResponseCode() Making Errant Second Call to Service
(Doc ID 1464857.1)
Last updated on MARCH 21, 2022
Applies to:Oracle WebLogic Server - Version 10.3 to 10.3.2
Information in this document applies to any platform.
A webservice call that uses weblogic.net.http.HttpURLConnection has a 2nd call automatically tried when connection.getResponseCode() used in the code when there is a SocketTimeoutException. This occurs in the customer's code in a finally statement.
Issue discovered for a customer who has an application deployed in Weblogic container, in which, there is a client that sends Http POST requests to a REST type Web Service hosted by a third party. The client uses weblogic.net.http.HttpsURLConnection to make a http POST (same result with weblogic.net.http.HttpURLConnection). When a socket timeout is encountered, the http request is retried automatically after the specified ReadTimedOut param.
From testing it was discovered that this occurs because of connection.getResponseCode() in the finally statement.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document