commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael D. Hirsch" <mhir...@nubridges.com>
Subject RE: Ftp connections timing out
Date Tue, 31 Aug 2004 15:46:52 GMT
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:mhirsch@nubridges.com]
> 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: commons-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > commons-user-help@jakarta.apache.org
> > >
> > >
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> > 
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> 
> 
> 
> 
> ______________________________________________________________________
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org

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


Mime
View raw message