You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Po...@FT.com on 2003/03/31 19:58:26 UTC

Query on WebdavResource and simultaneous connections

Hi. I've scanned through the code and come to the following conclusions. I
would appreciate if anyone with knowledge of the client classes would
affirm/correct me where relevant:

(1) WebdavResource extends WebdavSession and according to documentation,
clients that use persistent connections should limit the number of
connections to a given server.
(2) A WebdavResource created by an outside caller always creates a new
connection. To impose this rule, the constructor for creating a
WebdavResource(HttpClient client) is private for some reason.
(3) A WebdavResource created by calling the
WebdavResource.getChildResources() re-uses the HttpClient for each
instance, so no connection worries there.

This is what I am thinking of doing to control the number of connections
_without_ implementing a Webdav connection pool manager:
===============================================================================================================

I can write my own client wrapper called "FTWebDavClient", making it a
singleton and let it only ever instantiate one instance of WebdavResource
ever.
This will help in some way towards limiting the number of connections
created. I could then call WebdavResource.getChildResources() to obtain a
WebdavResources object. The connection limit issue arises when I need to
add a new WebdavResource to my WebdavResources object since each new
addition = new connection. Is this correct?

If I want to get all my WebdavResource objects to share a session, I will
have to make the currently private constructor WebdavResource(HttpClient
client) public. Is there any dange/side-effect with this approach?

Thanks for you help. It's much needed.
Portia



**********************************************************************************
This email may contain confidential material. If you were not an
intended recipient, please notify the sender and delete all copies.
We may monitor email to and from our network.


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org