camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vcheruvu <>
Subject Router logic
Date Tue, 05 Jan 2010 07:08:47 GMT


I am trying to figure out if Camel can be used to achieve below scenario

1 . Poll each row updates from tables , mark if row processing successful
other wise mark as unread or Error if processing failed. This row processing
is marked completed only if it has completed 1,2 ,3 and 4.
2. tranform message to new entity for persisting.

3. Verify if Entity value exist in Look up table 
     3a. If values doesn't exist, populate in xyz look up tables

4. write new Entity to new table
So, to achieve above scenario, i have written sample router logic using
camel JAVA DSL but i am unsure how step 3 and 3a will be written in my
configure method. Please see my code as shown below. Please correct me if I
am wrong. 

public void configure() throws Exception {
		 // the following will dump the database to files
// JPA polling consumer to get updates ..How does it update oldTableEntity
that row has been processed?
        .beanRef("TrasnformerCalss","translatemethod") //message tranlator
to map it to an newTableEntity
        .to("direct:LookUpTableCheck") // check entity field values exist in
look up tables.. how to add logic for writing to lookup table ?? Will this
be JPAProducer endpoint  where  more java logic code added ?
            .to("jpa:com.mbl.entity.newTableEntity"); //JPAProducer write to


Can you please provide me some guidance on how to achieve above scenario
using Camel? I have looked at the Examples  and uderstood basics of polling,
message translation , but it didn't cover much about 
scenarios such as questions raised in the sample code above. Thanks in


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

View raw message