camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bryan <>
Subject Spring remoting proxy call from within a route bean
Date Fri, 09 Jul 2010 00:39:19 GMT

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" 
  serviceInterface="com.pkg.MyApi" /> 
<endpoint id="fileInput" uri="file:${my.file.dir}" /> 
  <from ref="fileInput" /> 
  <split  parallelProcessing="false" streaming="true"> 
    <tokenize token="\n" regex="false" /> 
    <unmarshal><csv /></unmarshal> 
    <bean ref="inputBean" method="translate" /> 

The inputBean has a reference to myProxy, and it calls a method on myProxy
inside the translate() method. 
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message