You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Rami Ojares <ra...@elisa.fi> on 2004/07/03 00:27:05 UTC

Re: [VFS] FileSystem close

> Hi,
> 
> I asked about this a little while ago - when you resolve a file for a SFTP  
> url, the SFTP file system maintains the session until the file manager is  
> closed - the solution you propsed (see below) works well, but this will  
> not work if I try to use this in a multi-threaded environment.
> 
> What are the general thoughts about this?

One sftp filesystem keeps at most one idle connection open.
So it is like connection pool whose max size is one.

Now you have multiple threads accessing the same sftp server
but you would not like to have an idle connection open, right?

One possible direction to take would be to develop the pooling
mechanism (maybe use commons-pooling?) and give an option to the
sftp provider pooling=true|false.

Would this solve your problem?

- rami

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


Re: [VFS] FileSystem close

Posted by Mario Ivankovits <im...@apache.org>.
Rami Ojares wrote:

>>Hi,
>>
>>I asked about this a little while ago - when you resolve a file for a SFTP  
>>url, the SFTP file system maintains the session until the file manager is  
>>closed - the solution you propsed (see below) works well, but this will  
>>not work if I try to use this in a multi-threaded environment.
>>
>>What are the general thoughts about this?
>>    
>>
>
>One possible direction to take would be to develop the pooling
>mechanism (maybe use commons-pooling?) and give an option to the
>sftp provider pooling=true|false.
>  
>
Disabling pooling (even the one-sized) is IMHO not an option as this 
might make this FileSystem dog slow and the network bandwith might 
greatly increase - for every request we have to run through the 
authentication process and reattach the sftp channel.

--
Mario