Please validate my understanding of how HttpClient and the other classes work together.
1. When I do "httpclient = new HttpClient", the object is created by default with the SimpleHttpConnectionManager. 2. I create "post = new PostMethod(url)" and call httpclient.executeMethod(post). At this point httpclient takes the url in the post object and using the SimpleHttpConnectionManager, creates a HttpConnection object. This connection is retained by the SimpleHttpConnectionManager and (possibly?) reused. 3. After connection is established, data is posted, and the result retrieved. 4. I do post.releaseConnection(). Does the connection get closed at this point? Is the HttpConnection object still around? What do I need to do if I had wanted to have the connection stay alive (because it takes time to re-establish the connection)? 5. Is post.recycle() related to connection in any way? What is the purpose of this? Is PostMethod ctor an expensive operation? 6. SimpleHttpConnectionManager doc says "This manager makes no attempt to provide exclusive access to the contained HttpConnection". Does this mean that calling httpclient.execute() method in this case is not thread-safe? 7. If I wanted to use "connection pooling" should I be using MultiThreadedHttpConnectionManager instead? Or do I need to implement my own pooling? I am sure I have other questions, but this will do for now. :) Thanks. Om. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
