You can use the Java DSL instead the XML DSL and in the configure() method
you have to implement you can loop and create as many similar routes you
need.

Best,
Christian

On Thu, Jan 12, 2012 at 8:02 PM, rifazjeoffrey <[email protected]
> wrote:

> Thanks....that worked...this is my final route,
>
> <route id="mb-database-poller">
>                        <from
> uri="timer://InbdPoller?fixedRate=true&amp;period=5s"/>
>                        <setBody>
>                                <constant>1</constant>
>                        </setBody>
>                        <to
>
>
> uri="mybatis-comm:fetchMessagesReadyForDelivery?statementType=SelectList&amp;consumer.useIterator=false&amp;maxMessagesPerPoll=100"
> />
>
>                        <bean ref="inboundTransportDocumentConverter"
> method="updateStatus" />
>
>                        <split>
>                                <simple>${in.body}</simple>
>                                <bean
> ref="inboundTransportDocumentConverter"
> method="constructMessageFromDatabase" />
>                <to uri="direct:inboundEndpoint" />
>            </split>
>
>                </route>
>
> Here comes another question, we actually need to run multiple database
> poller (like the one above) which means, as far I know, I need to duplicate
> the above route to as many times I want and just the value of the
> 'constant'
> on every poller.
>
> Is there a way I can avoid creating routes which are going to look similar
> ?
>
> I solved that issue on DAO side based on your suggestions.
>
> ANy help will reduce route duplication !
>
> Thanks,
> Jeff
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Pass-variable-to-mybatis-component-tp5137772p5140746.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to