-
1. Re: servicemix-ftp and unusual File Filtering rules
gertv Jun 19, 2008 2:58 AM (in response to lcurry)Lowry,
You could use a FileFilter implementation if you provide it with it's own connection to the same FTP server, using e.g. another <ftp:pool> to provide the connections. Just wire them together using plain Spring syntax in your xbean.xml file.
Your FileFilter's accept() method can than access the same FTP server to see if the matching done_ file is there before return true to the FTP poller.
Regards,
Gert
-
2. Re: servicemix-ftp and unusual File Filtering rules
lcurry Jun 19, 2008 5:34 PM (in response to gertv)I'm not sure i understand. I don't see <ftp:pool> documented anywhere. What attributes are available to set? What servicemix class does this correspond to? I assume my logic would go in custom Filter class accept() method. Here i'd need to utilize the standard FTPClient, etc. to connect back to the ftp server and do things on it.
Any xbean snippets that give the gist of what i'd be doing. Even if different bean class i could extrapolate.
Thanks,
-
3. Re: servicemix-ftp and unusual File Filtering rules
gertv Jun 20, 2008 6:39 AM (in response to lcurry)Lowry,
The <ftp:pool/> element creates an org.apache.servicemix.ftp.FTPClientPool instance. If you give it an id, you can reference it from you CustomFilter using plain Spring syntax.
Probably missing some details, but just to give you an idea...
<ftp:poller filter="#CustomFilter"/> <bean id="CustomFilter" class="my.custom.FilterImpl"> <property name="pool"><ref bean="ConnectionPool"></ref> </bean> <ftp:pool id="ConnectionPool" host="server" username="myUser" password="myPassword"></ftp:pool>
Regards,
Gert
Edited by: gertv on Jun 20, 2008 6:27 AM
-
4. Re: servicemix-ftp and unusual File Filtering rules
lcurry Jul 9, 2008 10:30 AM (in response to lcurry)thanks!