Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 43421 invoked from network); 2 Sep 2005 06:04:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Sep 2005 06:04:41 -0000 Received: (qmail 8400 invoked by uid 500); 2 Sep 2005 06:04:37 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 8327 invoked by uid 500); 2 Sep 2005 06:04:36 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 8309 invoked by uid 500); 2 Sep 2005 06:04:36 -0000 Received: (qmail 8302 invoked by uid 99); 2 Sep 2005 06:04:36 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 01 Sep 2005 23:04:36 -0700 Received: (qmail 43377 invoked by uid 65534); 2 Sep 2005 06:04:35 -0000 Message-ID: <20050902060435.43376.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r266292 - in /jakarta/commons/proper/vfs/trunk: RELEASE_NOTES.txt src/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java Date: Fri, 02 Sep 2005 06:04:35 -0000 To: commons-cvs@jakarta.apache.org From: imario@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: imario Date: Thu Sep 1 23:04:28 2005 New Revision: 266292 URL: http://svn.apache.org/viewcvs?rev=266292&view=rev Log: enh: check IOException instead of FTPConnectionClosedException to handle cases where we are not able to correctly check if a socked is closed Modified: jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java Modified: jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt?rev=266292&r1=266291&r2=266292&view=diff ============================================================================== --- jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt (original) +++ jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt Thu Sep 1 23:04:28 2005 @@ -13,7 +13,12 @@ zip, jar, ....: allow filenames without trailing "!" allow createFilesystem with .gz files -better handling of file/folder flag with compressed files +better handling of file/folder flag with compressed files + +ftp: +check IOException instead of FTPConnectionClosedException. +This should make ftp retry more robust even if for some case the state of the +socket isnt correctly reported as closed. 2005-08-13 commons-vfs 1.0 RC3 Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java?rev=266292&r1=266291&r2=266292&view=diff ============================================================================== --- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java (original) +++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java Thu Sep 1 23:04:28 2005 @@ -16,7 +16,6 @@ package org.apache.commons.vfs.provider.ftp; import org.apache.commons.net.ftp.FTPClient; -import org.apache.commons.net.ftp.FTPConnectionClosedException; import org.apache.commons.net.ftp.FTPFile; import org.apache.commons.vfs.FileSystemException; import org.apache.commons.vfs.FileSystemOptions; @@ -99,7 +98,7 @@ { return getFtpClient().listFiles(key, relPath); } - catch (FTPConnectionClosedException e) + catch (IOException e) { disconnect(); return getFtpClient().listFiles(key, relPath); @@ -112,7 +111,7 @@ { return getFtpClient().removeDirectory(relPath); } - catch (FTPConnectionClosedException e) + catch (IOException e) { disconnect(); return getFtpClient().removeDirectory(relPath); @@ -125,7 +124,7 @@ { return getFtpClient().deleteFile(relPath); } - catch (FTPConnectionClosedException e) + catch (IOException e) { disconnect(); return getFtpClient().deleteFile(relPath); @@ -138,7 +137,7 @@ { return getFtpClient().rename(oldName, newName); } - catch (FTPConnectionClosedException e) + catch (IOException e) { disconnect(); return getFtpClient().rename(oldName, newName); @@ -151,7 +150,7 @@ { return getFtpClient().makeDirectory(relPath); } - catch (FTPConnectionClosedException e) + catch (IOException e) { disconnect(); return getFtpClient().makeDirectory(relPath); @@ -174,7 +173,7 @@ { return getFtpClient().retrieveFileStream(relPath); } - catch (FTPConnectionClosedException e) + catch (IOException e) { disconnect(); return getFtpClient().retrieveFileStream(relPath); @@ -189,7 +188,7 @@ client.setRestartOffset(restartOffset); return client.retrieveFileStream(relPath); } - catch (FTPConnectionClosedException e) + catch (IOException e) { disconnect(); @@ -205,7 +204,7 @@ { return getFtpClient().appendFileStream(relPath); } - catch (FTPConnectionClosedException e) + catch (IOException e) { disconnect(); return getFtpClient().appendFileStream(relPath); @@ -218,7 +217,7 @@ { return getFtpClient().storeFileStream(relPath); } - catch (FTPConnectionClosedException e) + catch (IOException e) { disconnect(); return getFtpClient().storeFileStream(relPath); @@ -233,11 +232,11 @@ // it should be better to really "abort" the transfer, but // currently I didnt manage to make it work - so lets "abort" the hard way. // return getFtpClient().abort(); - + disconnect(); return true; } - catch (FTPConnectionClosedException e) + catch (IOException e) { disconnect(); } --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org