camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BAnanth <>
Subject Camel-FTP - retrieving the files tranferred and updating DB
Date Thu, 31 Oct 2013 10:15:23 GMT

I have  the following requirement  

a. I have to transfer a file between two FTP servers. The URI's are
dynamically created.  (This has been done)
b. Upon the successful transfer, I need to update the database with all the
files that have been succesfully transferred.
b.1 The DB table has the following structure id,filename,
c. Upon Exception the same has to be captured in the database.
(transferStatus column to be updated)

The snippet of the 'configure' method of the 'RouteBuilder' class is
displayed below. (from, to etc are the parameters passed and refer to the
FTP from URI and to URI respectively)

/public void configure() throws Exception {
                String successQry =
to get", from, FTPConstants.FTP_SUCCESSFUL, to, channelId);
               String failedQry =
to get", from, FTPConstants.FTP_FAILED, to, channelId);

I am facing the following problems,
a. The success qry and failure qry are always fixed. Even though I am
generating a unique UUID for file history table,the query generated uopon
the execution always inserts the same record again and again.
b. What could be the alternate approach (other than onComplete()). 
c. How do I get the file names and other parameters of the file from the

Thanks and Regards,

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message