commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johan Lindquist" <>
Subject Re: [VFS] Using sftp and vfs ...
Date Wed, 16 Jun 2004 09:41:27 GMT
Thanks for that Mario, will give that a go as that is pretty much the  
scenario i am using it right now - connect, do some file op and  
disconnect, possibly reconnecting later as a different user ...

Would it be possible though to have a file system option that would  
determine if the session is to be closed if all files are detached for  
example?  I have not had a chance to look in detail 'under the hood' of  
VFS yet, so i don't know if this is possible.



On Tue, 15 Jun 2004 21:21:57 +0200, Mario Ivankovits <>  

> Johan Lindquist wrote:
>> I am using the VFS library to connect to a remote SFTP server and it  
>> is  working fine but it seems there is a thread hanging in the jsch  
>> libraries  (assuming it is the SSH session) ... Even if I call close on  
>> the file  objects the thread doesn't stop - is there another way to  
>> shut down the  remote jsch session?
> I know, this is not a solution (and maybe not even a workaround for you)  
> - the trick is to close the FileSystemManager, if you use  
> VFS.getManager() you could cast the returned FileSystemManager and then  
> close it. Maybe you instantiate VFS in some other way, however it should  
> be possible to cast anyway.
>         StandardFileSystemManager fsm = (StandardFileSystemManager)  
> VFS.getManager();
>         fsm.close();
> But this will close all files and resources allocated by this instance  
> !!!
> I will have a look how to do this more general (and maybe  
> automatically), but this might take a while.
> --
> Mario
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message