7 Replies Latest reply on Dec 18, 2006 8:37 PM by Esteban Schifman

    FtpClientUtil refactoring

    Bruno Georges Newbie

      In order to add support for protocol such as Secure FTP over SSL and SSH, which could be implemented using either open or closed source implementation. We need flexibility to extend and configure the bus to support any of these implementations.
      We discussed with Esteban to start with the following approach:

      Create an Interface based on the existing FtpClientUtil


      Create a Factory

      Implementation in the internal package
      Regular FTP:

      Secure FTP [over ssh]:


      update action classes to use the RemoteFileSystem factory

      I will check these in the workspace.

        • 1. Re: FtpClientUtil refactoring
          Kurt Stam Master

          Looks good Bruno. Where will one configure which implementation one wants? In the PropertyManager?

          • 2. Re: FtpClientUtil refactoring
            Bruno Georges Newbie

            This is where we left it . I believe this is one way of doing it.
            The factory will return the corresponding implementation. So far I haven't implemented this logic, instead I am focusing to get the EdtFtpImpl and JschFtpImpl class working. [Your input is welcome though :-) ]

            The method responsible for this in the factory looks like this so far:

            public static RemoteFileSystem getRemoteFileSystem(ConfigTree p_oP, boolean p_bConnect)
            throws RemoteFileSystemException
             // TODO get the implementation class from properties.
             //ConfigTree cfgTree = ConfigTree.fromInputStream((InputStream)new FileInputStream("ftp-esb-properties.xml"));
             return new EdtFtpImpl(p_oP,p_bConnect);

            • 3. Re: FtpClientUtil refactoring
              Kurt Stam Master

              Bruno, I think it makes sense to add a property to the PropertyManager configuration, which defines which implementation should be returned in the factory. All the other configuration should be added to the deployment-properties.xml, which I think is pretty much what you are going for. I can help you out with when it's integration time.

              Also by that time we need to refactor it to use the new Courier on the trunk. It supports setting up transports both ways (down and up). Take a look at the JmsCourier for instance. I think the FtpUploader and FtpDownloader fit right in there as an FtpCourier. But this is at a higher level then what you are working on right now, so let's not worry about that just yet.

              So basically I'm saying nothing but keep up the good work :).


              • 4. Re: FtpClientUtil refactoring
                Mark Proctor Apprentice

                jboss esb can "push" to ftp, are there plans to receive? I'm looking at the apache ftp server, which works with ssl, and you can hook in events for file uploads.

                • 5. Re: FtpClientUtil refactoring
                  Mark Little Master


                  "mark.proctor@jboss.com" wrote:
                  jboss esb can "push" to ftp, are there plans to receive? I'm looking at the apache ftp server, which works with ssl, and you can hook in events for file uploads.

                  If something is sending a message via FTP then there's an assumption that there is something receiving. We don't have a requirement for a specific FTP server, if that's what you mean, in the same way we won't for HTTP. As long as whatever implementation you use conforms to the EPR requirements, you should be able to use anything.

                  • 6. Re: FtpClientUtil refactoring
                    Daniel Brum Novice

                    We had it working 2-Way before with Rosetta. We should check with Esteban on this one as he is the one working on the couriers for this. I believe it is supported though.

                    • 7. Re: FtpClientUtil refactoring
                      Esteban Schifman Newbie

                      You are right Daniel. We can both 'deliver' and 'pick up' messages through FTP. The CourierFactory takes care of returning an appropriate courier for the protocol in the URL contained in the EPR argument.