On Tue, 2004-08-31 at 11:32, Charles Hudak wrote: > 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.
Yes, I do close the FileObject. I thought that would take care of it, but it didn't. I'm going to try closing the FileSystemManager, too, but I doubt it that will help. Michael > > > -----Original Message----- > From: Michael D. Hirsch [mailto:[EMAIL PROTECTED] > Sent: Tue 8/31/2004 6:23 AM > To: Jakarta Commons Users List > Cc: > 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. > > Michael > > > > > 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: [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] > > > > > > > ______________________________________________________________________ > --------------------------------------------------------------------- > 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]
