-
Oct 24th, 2006, 05:03 PM
#1
Odd error with HttpClient after jmx-modding property
Spring 1.2.8, WebLogic 8.1.4, JDK 1.4.2, httpclient 3.0rc3, commons-modeler 2.0, jmanage 1.5beta.
I have no idea where my problem lies here, but here's what I've seen:
A week or so ago I implemented a prototype of enabling JMX access to my Spring beans in my WebLogic 8.1.4 application. I used the workaround mentioned by Karl Baum to use commons-modeler's BaseModelMBean class. I used one trivial bean, and also a bean to modify the log4j config. This prototype worked perfectly. I could show that debug would appear or disappear depending on the value I dynamically set through jmanage.
Now I've gone further and added to the "beans" list an exsting bean that creates an HttpClient instance and configures it with its set properties. My test case uses basic auth and proxy auth. This code works fine normally.
My first test with this was to change the "timeout" value from the default of 20000 to 19999. When I tried to execute the code after setting that value, it failed with a bizarre problem. The downstream server returned "user authentication required", as if my user auth data was unset. I then stepped through this with Eclipse, and just before it called "executeMethod()", I inspected the HttpClient object, and all the authentication data looked fine. When I executed the method, it failed with the "user authentication required".
If I then redeploy the application, it works fine again. I tried stepping through the code after redeploy, and the HttpClient data seems to be the same as it was after setting the timeout through JMX, except for the timeout value being different by 1. I even tried setting the timeout value back to the default value of 20000, but that still fails.
I don't understand what could be going wrong here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules