I was wondering if the following design was acceptable, or if there is a
better way of doing it. Currently I have a route that reads in a CSV, parses
it, and passes it to a bean. Inside the bean's method call, the CSV data is
converted to an object. The bean also has a reference to a camel spring
remoting proxy, and it calls a method on this and passes in the object. The
proxy adds a message to a queue.
I was concerned that I was calling the proxy from within the bean's route
method. This seems like it will start a new route from within the first
route. It seems to work fine, but wanted to make sure I wouldn't get bitten
by this down the road.
My route looks like this:
<camelContext id="camelContext">
<proxy id="myProxy"
serviceUrl="activemq:queue:myQueue?transferException=true"
serviceInterface="com.pkg.MyApi" />
<endpoint id="fileInput" uri="file:${my.file.dir}" />
<route>
<from ref="fileInput" />
<split parallelProcessing="false" streaming="true">
<tokenize token="\n" regex="false" />
<unmarshal><csv /></unmarshal>
<bean ref="inputBean" method="translate" />
</split>
</route>
</camelContext>
The inputBean has a reference to myProxy, and it calls a method on myProxy
inside the translate() method.
--
View this message in context:
http://camel.465427.n5.nabble.com/Spring-remoting-proxy-call-from-within-a-route-bean-tp1045274p1045274.html
Sent from the Camel - Users mailing list archive at Nabble.com.