I have a multithreaded app that is issuing SOAP requests via AXIS. It seems that if 
thread 1 sets a http.proxyHost AxisProperty then it's visible to thread 2 when he 
calls AxisProperties.getProperty(). (Because AxisProperties is tied to the current 
ClassLoader?).  

The problem I have is that I would like to have these multiple http requests on 
different threads potentially target different (or no) proxy hosts, ie, each thread 
gets its own AxisProperties. 

To complicate things there seems to be an additional layer involved which is that down 
in the DefaultSocketFactory.create() logic during the "writeToSocket" there is a call 
to TransportClientPropertiesFactory.create("http") which returns a cached properties 
object, but I *think* all that he is doing is making calls to 
AxisProperties.getProperty().

Anyone have a recommendation for how to go about this? Thoughts occurring to me are to 
replace the socket factory class with my own (with 
AxisProperties.setProperty("axis.socketFactory",.. )?) and use ThreadLocal to get the 
proxy values down to that level from my app code, and avoid the 
TransportClientProperties cached object. But that seems a little inelegant. Anyone any 
ideas?

-gr

Reply via email to