Warwick,

Thanks for your reply.

The HttpConnection that I am referring to is 
method.releaseConnection() after the method is executed.

Calling this method would just close the current request and not re-set the
HttpClient state. In other words the HttpClient will still hold on to any
cookies from the previous handshake and the next Method execution would not
have to re-authenticate. So you would still be able to use the same
WebdavResource by setting a new path to perform another operation.
Calling releaseConnection may also be useful for uploading files with
Transfer-Encoding:Chunked. Certain WebServers/AppServers expect an explicit
client close connection as an indication for end of stream.

Could there be any other reason for not releasing the connection? Or is this
just an oversight?

Thanks,
Ritu



-----Original Message-----
From: Warwick Burrows [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 08, 2005 9:54 PM
To: Slide Users Mailing List
Subject: RE: A question on Http Connection obtained by WebdavResoruce



I believe this was a design choice to allow connections to be reused
(persistent connections) rather than opening/closing a connection on
every DAV method call. For example I have one webdavresource per thread
and reuse the webdavresource by making use of the setPath() command to
change the resource target for the webdavresource or by using the
methods that take a path to specify which resource is the target of the
method call.

Warwick


> -----Original Message-----
> From: Ritu Kedia [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 08, 2005 1:36 AM
> To: Slide Users Mailing List (E-mail)
> Subject: A question on Http Connection obtained by WebdavResoruce
> 
> 
> Hello,
> 
> I was looking into a caching solution to cache the 
> WebdavResource obtained for a user so as to avoid the time 
> taken to re-authenticate that user to Slide App. In doing so 
> I came across the way the HttpClient is managed by the 
> WebdavResource. After execution of any method the 
> HttpConnection is not being released. Is there any specific 
> reason for this? 
> 
> On Commons HttpClient
> site(http://jakarta.apache.org/commons/httpclient/tutorial.htm
> l) it is mentioned that "It is important to always release 
> the connection regardless of whether the server returned an 
> error or not."
> 
> If the connection is not released when will it be closed by 
> default? I believe that would depend on the ConnectionTimeout 
> setting of HttpClient. However I saw that in WebdavSession 
> the timeout is not being explicitly set, so the default value 
> of 0 must be applied. In this case when would the connection 
> be closed? Would it then depend on the server timeout 
> settings? Anyone having any knowledge of these issues, please 
> do reply.
> 
> Thanks,
> Ritu
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to