<camelContext xmlns="http://camel.apache.org/schema/spring" trace="false">
<route id="route2">
<from uri="activemq:foo"/>
<doTry>
<bean method="myMethod" ref="myBean">
<log logName="myFile" message="Processing done"/>
</bean>
<doCatch>
<exception>java.io.IOException</exception>
<to uri="file:io-error"/>
</doCatch>
</doTry>
</route>
</camelContext>