commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Hudak" <>
Subject RE: Ftp connections timing out
Date Tue, 31 Aug 2004 15:32:32 GMT
Are you closing the FileObject that you get from the FileSystemManager after using it? I would
think that closing the FileObject would clean up any resources, including the filesystem that
backs it.

-----Original Message-----
From:	Michael D. Hirsch []
Sent:	Tue 8/31/2004 6:23 AM
To:	Jakarta Commons Users List
Subject:	RE: Ftp connections timing out
On Mon, 2004-08-30 at 16:33, Charles Hudak wrote:
> > What appears to be going on is that the vfs does not close
> > the ftp connection after the first ftp put.  A few minutes
> > later, the ftp server times out and closes the connection,
> > but vfs doesn't seem to notice.
> I've never used VFS but after a quick poke at the api it looks like
> you
> should be cleaning up after using the VFS by doing:
> FtpFileSystem.closeConnection(FTPClient);

Thanks, Charles,

Yes, that looks like it might work.  The problem with it is that I'm
trying to just use the VFS.  VFS supports ftp, smb, sftp, http, etc.  If
I'm doing a file put I should just be able to pass the URL to VFS and it
will transfer the file.  But this solution requires me to do something
different for ftp than for the other protocols.  It seems like this
close capability is not exposed at a higher, more generic level.  I
would have expected some such close method in the FileSystemManager, and
it would be a no-op for some protocols.

I'm hoping that I'm missing something.

> > The next time into the code, the same (close) connection is
> > used but since the ftp server has closed that connection it
> > fails (and vfs returns a with a bogus error message).
> >
> > What is the proper way to do this?  I feel like I must be
> > mising something obvious.
> >
> > Thanks,
> >
> > Michael
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message