Merge "Issue #1538 Made http timeouts configurable on registry service http connections" into development

Former-commit-id: 8dc43c5bc1 [formerly d7036ceeb4] [formerly 4776e83979] [formerly 9cf347fe7f [formerly 4776e83979 [formerly a12bc6ddd2fd4388fc541015926e2e51aa40e090]]]
Former-commit-id: 9cf347fe7f
Former-commit-id: b0d2a2ed02d8a815274915d8dfbbf4e797fb3dd5 [formerly 7e171abbb8]
Former-commit-id: 1724640945
This commit is contained in:
Richard Peter 2013-10-23 10:01:00 -05:00 committed by Gerrit Code Review
commit c2514c8bdd
2 changed files with 21 additions and 2 deletions

View file

@ -0,0 +1,2 @@
ebxml-http-receive-timeout=40000
ebxml-http-connection-timeout=30000

View file

@ -114,8 +114,25 @@ public class RegistrySOAPServices {
static { static {
proxyConfig = getProxyConfiguration(); proxyConfig = getProxyConfiguration();
httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setReceiveTimeout(15000);
httpClientPolicy.setConnectionTimeout(10000); try {
httpClientPolicy.setReceiveTimeout(Long.parseLong(System
.getProperty("ebxml-http-receive-timeout")));
} catch (NumberFormatException e) {
statusHandler
.error("ebxml-http-receive-timeout not specified. Using default value of 1 minute",
e);
httpClientPolicy.setReceiveTimeout(60000);
}
try {
httpClientPolicy.setConnectionTimeout(Long.parseLong(System
.getProperty("ebxml-http-connection-timeout")));
} catch (NumberFormatException e) {
statusHandler
.error("ebxml-http-connection-timeout not specified. Using default value of 10 seconds",
e);
httpClientPolicy.setReceiveTimeout(10000);
}
httpClientPolicy.setConnection(ConnectionType.KEEP_ALIVE); httpClientPolicy.setConnection(ConnectionType.KEEP_ALIVE);
httpClientPolicy.setMaxRetransmits(5); httpClientPolicy.setMaxRetransmits(5);
if (proxyConfig != null) { if (proxyConfig != null) {