On Tue, Nov 9, 2010 at 12:50 AM, rxm0203 <rah_me...@yahoo.com> wrote: > > I am using following XML snippet to declare custom predicate on my route. > However, Camel 2.4 is throwing exception. It looks like Camel is not able to > find Bean from exception message. Is it a correct syntax for custom > predicate declaration? > > <bean id="filterPredicate" class="test.MockPredicate"/> <camelContext > id="camel" xmlns="http://camel.apache.org/schema/spring"> <route> <from > uri="activemq:queueA"/> <filter> <method ref="filterPredicate"/> <to > uri="activemq:queueB"/> <filter> </route> </camelContext> > > If it is incorrect, what is correct syntax? >
Looks like it yeah. What exception do you get? > Can I make route transactional with following syntax? > > <bean id="filterPredicate" class="test.MockPredicate"/> <camelContext > id="camel" xmlns="http://camel.apache.org/schema/spring"> <route> <from > uri="activemq:queueA"/> <transacted/><filter> <method > ref="filterPredicate"/> <to uri="activemq:queueB"/> <filter> </route> > </camelContext> > Yes just add <transacted/> to the route. And also since you use JMS/ActiveMQ you need to enable transacted=true on the JMS connection factory. There is a free excerpt of the Camel book chapter 9 here, which covers transactions with Camel http://fusesource.com/fuse/apache-books/ > Thanks, > > Ray > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Custom-Predicates-definition-in-Spring-XML-tp3256012p3256012.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/