servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r486715 - in /incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net: FTPPoller.java FTPSender.java
Date Wed, 13 Dec 2006 16:31:32 GMT
Author: gnodet
Date: Wed Dec 13 08:31:31 2006
New Revision: 486715

URL: http://svn.apache.org/viewvc?view=rev&rev=486715
Log:
SM-775: Positive preliminary response from server when using FTPSender to send multiple files

Modified:
    incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPPoller.java
    incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPSender.java

Modified: incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPPoller.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPPoller.java?view=diff&rev=486715&r1=486714&r2=486715
==============================================================================
--- incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPPoller.java
(original)
+++ incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPPoller.java
Wed Dec 13 08:31:31 2006
@@ -154,13 +154,13 @@
     protected void processFile(FTPClient client, FTPFile file) throws Exception {
         String name = file.getName();
         InputStream in = client.retrieveFileStream(getWorkingPath() + name);
-        client.completePendingCommand();
         InOnly exchange = getExchangeFactory().createInOnlyExchange();
         NormalizedMessage message = exchange.createMessage();
         exchange.setInMessage(message);
         marshaler.readMessage(exchange, message, in, name);
         getDeliveryChannel().sendSync(exchange);
         in.close();
+        client.completePendingCommand();
     }
 
 

Modified: incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPSender.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPSender.java?view=diff&rev=486715&r1=486714&r2=486715
==============================================================================
--- incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPSender.java
(original)
+++ incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPSender.java
Wed Dec 13 08:31:31 2006
@@ -126,7 +126,6 @@
             done(exchange);
         }
         finally {
-            returnClient(client);
             if (out != null) {
                 try {
                     out.close();
@@ -135,6 +134,8 @@
                     log.error("Caught exception while closing stream on error: " + e, e);
                 }
             }
+            client.completePendingCommand();
+            returnClient(client);
         }
     }
 



Mime
View raw message