matt alberty

+ Follow
since May 27, 2005
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by matt alberty


Have a question. I'm using the apache http client to connect over https through a proxy server.

In our production environment we get around 5 - 10 of the following error daily: Read timed out

Any ideas on what might be causing this or suggestions on how to try and isolate it?

if (password != null && userName != null) {
debugLog( "invokeWebService: setting HTTP credentials & to do Authentication" );
org.apache.commons.httpclient.Credentials httpCredentials = new org.apache.commons.httpclient.UsernamePasswordCredentials( userName, password );
// httpClient
httpClient.getState().setCredentials( org.apache.commons.httpclient.auth.AuthScope.ANY, httpCredentials );
poster.setDoAuthentication( true );
if (proxyHost != null) {
debugLog("Proxy settings were present in the config file - will set the proxy in the httpClient");
httpClient.getHostConfiguration().setProxy(proxyHost, proxyPort);
debugLog( "invokeWebService: Post HTTP" );
httpClient.executeMethod( poster );
int status = poster.getStatusCode();
15 years ago
The first call. At this point it's looking like it is a database issue.
In my code I use a while loop and next method on my result set. However, in this case it is taking upwards of 2 seconds to execute the next statement. Any ideas? The result set is only 4 rows. Am I not understanding exactly what the next method on the resultSet object is doing. It seems as if from the performance this is actually where the databse is getting queried.
Thanks guys .. I'll try what you suggested .. what I need to do is look in a map that contains a key/value pair such as (101,ACTIVE). I'll have the 101 value as input so I can translate it to ACTIVE. On the outbound though I have the ACTIVE key now and need the 101 value. We explored creating 2 maps but were are worried about having too store 2 maps.
17 years ago
I have a hashmap and need to do a loookup on the values in it both ways. Anyone have any suggestions on how to handle this?
17 years ago