camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From somT <stol...@gmail.com>
Subject doTry, doCatch does not work for bean in the Camel Spring DSL
Date Thu, 09 Apr 2015 22:22:54 GMT
I have the route like below. Looks like the Spring bean ref does not work in
the doTry/doCatch in the Camel Spring DSL. Where as if I make the bean ref
to an individual processor - then it works. Is that a limitation in Camel?
Can any one advise on this?

<route id="My-cron-route" trace="true" >
        <from uri="quartz://report?cron=0+0/2+*+*+*+?" />
            <setHeader
headerName="datasource"><simple>ref:MyRouteDao</simple></setHeader>
            <setHeader
headerName="DEST_DIR"><constant>c:/temp/destination</constant></setHeader>
        <doTry>
            <process ref="MyFileLockGenerator" />
            <choice>
                <when>
                    <simple>${ in.header.MyFileLockAcquired } ==
"true"</simple>
                    <to
uri="bean:MyBeanOperation?method=findAllOutboundFolderList"/>
                    <to
uri="bean:MyBeanOperation?method=getFilteredFilesFromOutboundFolders"/>
                    <to
uri="bean:MyBeanOperation?method=moveFilesToDestinationFolder"/>
                    <to
uri="bean:MyBeanOperation?method=createTriggerFilesInDestinationFolder"/>
                    <to
uri="bean:MyBeanOperation?method=deleteSourceFiles"/>
                    <doCatch>
                        <exception>java.lang.Exception</exception>
                        
                    </doCatch>
                    <doFinally>
                        <to
uri="bean:MyFileLockGenerator?method=releaseExclusiveReadLock()"/>  
                    </doFinally>
                </when>
            </choice>
        </doTry>
    </route>



-----
Somesh
--
View this message in context: http://camel.465427.n5.nabble.com/doTry-doCatch-does-not-work-for-bean-in-the-Camel-Spring-DSL-tp5765549.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message