You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by an...@apache.org on 2014/07/17 11:27:55 UTC
svn commit: r1611307 -
/tomee/tomee/branches/tomee-1.7.x/server/openejb-client/src/main/java/org/apache/openejb/client/HttpConnectionFactory.java
Author: andygumbrecht
Date: Thu Jul 17 09:27:55 2014
New Revision: 1611307
URL: http://svn.apache.org/r1611307
Log:
Revert to default read timeout
Modified:
tomee/tomee/branches/tomee-1.7.x/server/openejb-client/src/main/java/org/apache/openejb/client/HttpConnectionFactory.java
Modified: tomee/tomee/branches/tomee-1.7.x/server/openejb-client/src/main/java/org/apache/openejb/client/HttpConnectionFactory.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/server/openejb-client/src/main/java/org/apache/openejb/client/HttpConnectionFactory.java?rev=1611307&r1=1611306&r2=1611307&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/server/openejb-client/src/main/java/org/apache/openejb/client/HttpConnectionFactory.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/server/openejb-client/src/main/java/org/apache/openejb/client/HttpConnectionFactory.java Thu Jul 17 09:27:55 2014
@@ -17,7 +17,7 @@
*/
package org.apache.openejb.client;
-import javax.net.ssl.*;
+import javax.net.ssl.HttpsURLConnection;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -60,7 +60,7 @@ public class HttpConnectionFactory imple
httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.setDoOutput(true);
- int timeout;
+ final int timeout;
if (params.containsKey("connectTimeout")) {
timeout = Integer.parseInt(params.get("connectTimeout"));
} else {
@@ -70,13 +70,9 @@ public class HttpConnectionFactory imple
httpURLConnection.setConnectTimeout(timeout);
if (params.containsKey("readTimeout")) {
- timeout = Integer.parseInt(params.get("readTimeout"));
- } else {
- timeout = 10000;
+ httpURLConnection.setReadTimeout(Integer.parseInt(params.get("readTimeout")));
}
- httpURLConnection.setReadTimeout(timeout);
-
if (params.containsKey("sslKeyStore") || params.containsKey("sslTrustStore")) {
try {
((HttpsURLConnection) httpURLConnection).setSSLSocketFactory(new SSLContextBuilder(params).build().getSocketFactory());