Hi John, Thanks for taking intereset in Servicemix. The easiest way for us to integrate your bug fixes would be to raise a jira issue and attach a patch (either a diff or whole files) so that we can commit them.
It would be great if you could do that, else i'll try to make the needed modifications. Cheers, Guillaume Nodet ---------- Initial Header ----------- From : "HURST, John B" <[EMAIL PROTECTED]> To : <[email protected]> Cc : Date : Thu, 6 Oct 2005 11:09:03 +1000 Subject : [servicemix-user] FTPPoller issues Hi all, I am playing around with ServiceMix because it sounds like a great fit for my client. The organization has a number of integration problems to solve, and seems to be keen on the idea of an ESB. We're already a Java + Spring shop for internal applications, and the idea of the JBI standard sounds like a good concept to me. Well done on all your work so far. I tried to get something running with the FTPPoller component, and I think I have found a few issues with it. (I checked out the latest source from CVS today to check whether anything has changed in FTPPoller from SM 1.0 -- seems not.) 1) processFile() doesn't call done(exchange) after setting it up. It seems like this is a necessary step! (It sure makes it work better for me...) 2) FTPPoller doesn't seem to have any handling for directories. E.g. my test FTP server (WarFTP for windows) returns "." and ".." from listFiles(), and that seems to cause some trouble. (FTPPoller tries to download them.) 3) The path property, as implemented, doesn't work for me. The logic if (path != null) { files = ftp.listFiles(path); } else { files = ftp.listFiles(); } leaves the FTPClient in the top directory, and subsequently client.retrieveFileStream(), which does not specify the path, doesn't work. I added: private String getWorkingPath() { return path == null ? "." : path; } And made a couple other changes: // (in poll()) FTPFile[] files = ftp.listFiles(getWorkingPath()); // (in processFile()) InputStream in = client.retrieveFileStream(getWorkingPath() + name); // (in the other processFile()) client.deleteFile(getWorkingPath() + file.getName()); This works for me. 4) There seems to be some issue with whether FTPClient completes commands synchronously. I had to add client.completePendingCommand(); after retrieveFileStream() to get it to work reliably. Is this correct? (I haven't used FTPClient before.) 5) There is very little error checking generally. For example, if it fails to delete the file from the server after it is retrieved, there is no error reported. Should there be? I am pretty keen to use ServiceMix (at least in a trial), and would be willing to help at least with fixes for things like this that I'm using. What should I do? Send a new copy of FTPPoller.java to someone? Or a patch? Use JIRA? Sorry about the long note ... John Hurst Wellington, New Zealand ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ------------ ALICE HAUT DEBIT A 29,95 EUR/MOIS ------------ ALICEBOX, l'offre Internet tout en 1 : ADSL, téléphonie, modem Wi-Fi et en exclusivité la hotline gratuite 24h/24 ! Soumis à conditions. Pour en profiter cliquez ici http://abonnement.aliceadsl.fr
