4 Replies Latest reply on Feb 2, 2009 9:54 AM by Daniel Bevenius

    FTP Provider error-directory not configurable

    Thomas Guenter Newbie

      Hi,

      in my ESB configuration containing an FTP-Gateway I tried to change the error-directory to an alternate location but was not successful in this change.

      My gateway configuration:

      <ftp-provider hostname="192.168.0.1" name="FTPSystemProvider">
       <ftp-bus busid="importFTPChannel">
       <ftp-message-filter
       username="user"
       password="pws"
       directory="test"
       input-suffix="*/*.zip"
       work-suffix=".esbInProcess"
       post-delete="false"
       error-directory="error"
       error-suffix=".esbFailure"
       passive="true"
       read-only="false"/>
       </ftp-bus>
      </ftp-provider>



      My listener configuration:
      <service
       name="import"
       description="import"
       category="importCategory">
       <listeners>
       <ftp-listener
       name="ImportFTP"
       is-gateway="true"
       busidref="importFTPChannel"
       schedule-frequency="5">
       <property name="composer-class" value="com.sample.transfer.listener.RemoteToLocalMessageComposer"/>
       <property name="local-mirror-dir" value="/Developer/temp/import/mirror"/>
       </ftp-listener>



      I stepped through the source code a bit (version jbossesb-server-4.4.GA) and got stuck in the following method: org.jboss.soa.esb.listeners.gateway.AbstractFileGateway.AbstractFileGateway(ConfigTree config).

      The parameter config only shows a subset of the attributes configured in the jboss-esb.xml configuration:

      {target-service-category=importCategory, workSuffix=.esbInProcess, service-description=import, target-service-name=import, postDelete=false, maxThreads=1, schedule-frequency=5, postSuffix=.esbDone, inputSuffix=*/*.zip, local-mirror-dir=/Developer/temp/import/mirror, name=ImportFTP, passive=true, composer-class=com.sample.transfer.listener.RemoteToLocalMessageComposer, errorDelete=true, URL=ftp://user:pws@192.168.0.1/test, gatewayClass=org.jboss.soa.esb.listeners.gateway.RemoteGatewayListener}


      Hence, the declaration of the _errorDirectory member in the checkMyParams() method just uses the default value (inputDir) as error directory.

      A tried to track this down a bit and came to the method org.jboss.soa.esb.listeners.config.Configuration.create(String configXml, ObjectName serviceName) where the configXml contains the correct jboss-exb.xml data but the created config objects for listeners and gateway seem to loose some attributes. I wasn't able to understand what is exactly going on during the creation of the ConfigTree objects.

      Is this a bug or am I doing something completely wrong?

      Thanks in advance!
      Tom