Are you writing some code in your service class to manage the camel routes? My question is what's your service looks like.
If so, you'd better do the work yourself instead create another camel context in the spring configure file.
On 2/20/12 5:56 PM, Samruben wrote:
I want the full flow should be in xml not in java file. So only I am trying to use Spring concept. I have seen some jaxb example in the camelinaction source code. I have created a project using jaxb. I need to JAXB object which is in my method(jaxb annotated class) should directly be used to trigger off the flow defined in the XML. for this purpose.I have created a xml like this. whether its the right approach? <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd "> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent"> <property name="connectionFactory"> <bean class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value="tcp://localhost:61616" /> </bean> </property> </bean> <camelContext id="camel" trace="true" xmlns="http://camel.apache.org/schema/spring"> <dataFormats> <jaxb id="jaxb" contextPath="org.ebayopensource.turmeric.demo.v1.services"/> </dataFormats> <route> <from uri="direct:services"/> <marshal ref="jaxb"/> <to uri="jms:test.queue"/> </route> <route> <from uri="jms:test.queue"/> <unmarshal ref="jaxb"/> <to uri="mock:servicetest"/> </route> </camelContext> </beans> -- View this message in context: http://camel.465427.n5.nabble.com/routing-inside-xml-file-tp5483745p5498594.html Sent from the Camel - Users mailing list archive at Nabble.com.
-- Willem ---------------------------------- FuseSource Web: http://www.fusesource.com Blog: http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang
