I think Camel may be a good way to try to implement this.
For example you can implement a custom filter as a org.apache.camel.component.file.GenericFileFilter implementation, which reads that master XML file that contains the list of directories to use. Then you assign that filter to the ftp endpoint.
Then you know in the filter to return either true of false if the given file is within that master XML list of valid directories.
Then you can use recipient list EIP pattern to send the message to the FTP endpoint based on the IP address from the master XML list. You can use Java code to load the masterXML file and based on the file name from the message you can map it to the IP address.
And you can use error handling in Camel to catch exception and detour routing and send an email with some custom error message indicating the error.
Edited by: davsclaus on Sep 20, 2010 5:27 AM
Thanks for your guidance. I study & modify the hillert's example mentioned in camel webminar. I am left with exception handling and logging part.
Thanks a lot!
hi, I tried this one as well. I had a hard time with logging but I resolved it.
Hi jessica, i tried another approach for logging. i moved the camel project into servicemix. Took me some time to make the ftp and osgi deployment to work. Then i try splitting the existing servicemix log into various level. Finally creating the individual log file for each of the customers.
Hi donald,thank you for the information. When I run to this problem, which is I hope not to, I'll give your approach a try.
Do you have a code that you can recommend that i use?:)
Edited by: jessicaleahy on Oct 12, 2010 2:52 AM