ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jimisola Laursen" <>
Subject Re: HttpClient - usage etc
Date Mon, 17 Oct 2005 04:42:18 GMT

I made the post below almost a month ago. I can still make use of any 
information since I haven't had time to look into it myself yet.


----- Original Message ----- 
From: "Jimisola Laursen" <>
To: <>
Sent: Saturday, September 24, 2005 5:13 PM
Subject: HttpClient - usage etc

> Hi!
> I have server-client solution where we have problem with timeouts. Under 1.4 
> you
> have to use properties to set read and/connection timeout for the whole 
> program.
> So, I was delighted to see that HttpClient is available in XMLRPC-2.0 as
> timeouts can be set directly on the HttpClient.
> However, I spend some time last night trying to figure out 1) how to actually
> use it and 2) how to set timeouts.
> Is there no factory class to use with XmlRpcClient constructor for use of 
> HttpClient. The
> DefaultXmlRpcTransportFactory seems to be more than just a plain factory class
> as I in createTransportFactory noticed the Reflection construction call to a
> constructor with signature  java.util.Properties properties
> So, my questions are:
> 1) How do use Commons HttpClient and also set additional properties? Do I need
> to create a new factory class or extend DefaultXmlRpcTransportFactory and then
> adjust it after my needs? Or can I use DefaultXmlRpcTransportFactory as is - 
> in
> some way that I haven't been able to figure out yet? (might be interesting 
> with
> an example on the web site)
> 2) It says that "Note: Currently this transport is not thread safe": 
> What exactly does this mean? To refer to item 52 in Effective Java, is it:
> - conditionally thread-safe: thread-safe in methods are called in right 
> sequence
> - thread-compatible: thread-safe if all methods have external synchronization 
> (e.g. Collection classes)
> - thread-hostile: not thread-safe even if all methods have external 
> synchronization
> Read on that " HttpClient is fully thread-safe when used with a thread-safe 
> connection manager such as MultiThreadedHttpConnectionManager " (more info on 
> I am not very familiar with HttpClient, so bear with my questions. Does this 
> thread-safety only apply for HttpClient 3.0 (which seems to be close now)?
> Kind regards,
> Jimisola

View raw message