svn commit: r711203 - in /activemq/camel/branches/camel-1.x: ./ components/camel-ftp/ components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/ components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/ components/camel...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r711203 - in /activemq/camel/branches/camel-1.x: ./ components/camel-ftp/ components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/ components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/ components/camel...

davsclaus-2
Author: davsclaus
Date: Mon Nov  3 23:39:30 2008
New Revision: 711203

URL: http://svn.apache.org/viewvc?rev=711203&view=rev
Log:
Merged revisions 709850 via svnmerge from
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r709850 | davsclaus | 2008-11-02 09:24:59 +0100 (so, 02 nov 2008) | 2 lines
 
  CAMEL-1044: Added passive mode support for regular FTP
  CAMEL-1045: Upgraded to commons net 2.0
........

Added:
    activemq/camel/branches/camel-1.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpPassiveModeTest.java
      - copied unchanged from r709850, activemq/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpPassiveModeTest.java
Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    activemq/camel/branches/camel-1.x/components/camel-ftp/pom.xml
    activemq/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpUtils.java
    activemq/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConfiguration.java
    activemq/camel/branches/camel-1.x/components/camel-ftp/src/test/resources/log4j.properties

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov  3 23:39:30 2008
@@ -1 +1 @@
-/activemq/camel/trunk:711200
+/activemq/camel/trunk:709850,711200

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Nov  3 23:39:30 2008
@@ -1 +1 @@
-/activemq/camel/trunk:1-708421,708553-709447,709449-709612,709614-709634,709636-709849,709851-710013,711200
+/activemq/camel/trunk:1-708421,708553-709447,709449-709612,709614-709634,709636-710013,711200

Modified: activemq/camel/branches/camel-1.x/components/camel-ftp/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-ftp/pom.xml?rev=711203&r1=711202&r2=711203&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-ftp/pom.xml (original)
+++ activemq/camel/branches/camel-1.x/components/camel-ftp/pom.xml Mon Nov  3 23:39:30 2008
@@ -65,7 +65,7 @@
     <dependency>
       <groupId>commons-net</groupId>
       <artifactId>commons-net</artifactId>
-      <version>1.4.1</version>
+      <version>2.0</version>
     </dependency>
 
     <!-- testing -->
@@ -104,22 +104,14 @@
     </dependency>
 
     <dependency>
-      <groupId>backport-util-concurrent</groupId>
-      <artifactId>backport-util-concurrent</artifactId>
-      <version>3.1</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
       <scope>test</scope>
-      <version>1.5.2</version>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
       <scope>test</scope>
-      <version>1.5.2</version>
     </dependency>
     <dependency>
       <groupId>log4j</groupId>

Modified: activemq/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpUtils.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpUtils.java?rev=711203&r1=711202&r2=711203&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpUtils.java (original)
+++ activemq/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpUtils.java Mon Nov  3 23:39:30 2008
@@ -44,6 +44,12 @@
         LOG.trace("Connecting to " + config);
         client.connect(host, port);
 
+        // must enter passive mode directly after connect
+        if (config.isPassiveMode()) {
+            LOG.trace("Using passive mode connections");
+            client.enterLocalPassiveMode();
+        }
+
         boolean login;
         if (username != null) {
             LOG.trace("Attempting to login user: " + username);

Modified: activemq/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConfiguration.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConfiguration.java?rev=711203&r1=711202&r2=711203&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConfiguration.java (original)
+++ activemq/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConfiguration.java Mon Nov  3 23:39:30 2008
@@ -34,6 +34,7 @@
     private boolean directory = true;
     private FTPClientConfig ftpClientConfig;
     private Expression expression;
+    private boolean passiveMode;
 
     public RemoteFileConfiguration() {
     }
@@ -172,4 +173,17 @@
     public void setExpression(String fileLanguageExpression) {
         this.expression = FileLanguage.file(fileLanguageExpression);
     }
+
+    public boolean isPassiveMode() {
+        return passiveMode;
+    }
+
+    /**
+     * Sets passive mode connections.
+     * <br/>
+     * Default is active mode connections.
+     */
+    public void setPassiveMode(boolean passiveMode) {
+        this.passiveMode = passiveMode;
+    }
 }

Modified: activemq/camel/branches/camel-1.x/components/camel-ftp/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-ftp/src/test/resources/log4j.properties?rev=711203&r1=711202&r2=711203&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-ftp/src/test/resources/log4j.properties (original)
+++ activemq/camel/branches/camel-1.x/components/camel-ftp/src/test/resources/log4j.properties Mon Nov  3 23:39:30 2008
@@ -24,6 +24,7 @@
 log4j.logger.org.apache.camel.component.file=TRACE
 log4j.logger.org.apache.mina=WARN
 log4j.logger.org.apache.ftpserver=WARN
+log4j.logger.org.apache.commons.net=TRACE
 
 # CONSOLE appender not used by default
 log4j.appender.out=org.apache.log4j.ConsoleAppender