Author: mcardle
Date: Mon Aug 21 07:51:27 2006
New Revision: 313
URL: https://svndev.jahia.net/websvn/listing.php?sc=1&rev=313&repname=esi_server
Log:
* forces timeout on http connections
Modified:
trunk/src/net/sf/j2ep/ProxyFilter.java
Modified: trunk/src/net/sf/j2ep/ProxyFilter.java
URL:
https://svndev.jahia.net/websvn/diff.php?path=/trunk/src/net/sf/j2ep/ProxyFilter.java&rev=313&repname=esi_server
==============================================================================
--- trunk/src/net/sf/j2ep/ProxyFilter.java (original)
+++ trunk/src/net/sf/j2ep/ProxyFilter.java Mon Aug 21 07:51:27 2006
@@ -484,6 +484,7 @@
if (settings.getMaxPassThroughFetchers()!=-1)
passthroughThreadsAvailable = new
Semaphore(settings.getMaxPassThroughFetchers(), true);
executor = Executors.newCachedThreadPool(); //unlimited number of
threads with 60 second time-to-live
+
multiThreadedHttpConnectionManager.getParams().setStaleCheckingEnabled(true);
//redundant?
httpClient = new HttpClient(multiThreadedHttpConnectionManager);
httpClient.getParams().setBooleanParameter(HttpClientParams.USE_EXPECT_CONTINUE,
false);
@@ -492,6 +493,10 @@
httpClient.getHttpConnectionManager().
getParams().setConnectionTimeout(settings.getConnectionTimeout());
+
multiThreadedHttpConnectionManager.getParams().setConnectionTimeout(settings.getConnectionTimeout());
//redundant?
+
multiThreadedHttpConnectionManager.getParams().setSoTimeout(settings.getConnectionTimeout());
//redundant?
+ httpClient.getParams().setSoTimeout(settings.getConnectionTimeout());
//redundant?
+
httpClient.getParams().setConnectionManagerTimeout(settings.getConnectionTimeout());
//redundant?
if (SettingsBean.getInstance().isActivateInvalidationServer()) {
@@ -605,8 +610,6 @@
invalidationServer.removeService(SettingsBean.getInstance().getInvalidationPort());
}
- httpClient = null;
- serverChain = null;
cacheGZIPer.stop();
cacheJanitor.stop();
@@ -637,5 +640,12 @@
}
//log = null;
+
+ multiThreadedHttpConnectionManager.shutdown();
+
+ httpClient = null;
+ serverChain = null;
+
+
}
}
\ No newline at end of file