camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickaroni <rgfa...@directv.com>
Subject Re: Claus - Need better understanding of Camel "bean" tag usage with Spring prototype beans
Date Wed, 10 Sep 2014 17:45:10 GMT
Many (belated) thanks, Claus + Matt.

I think I'm finally getting the fact that the Exchange itself provides an
object with the scope I was seeking (i.e. from when the input message
received by Camel an input transport to when the output message sent from
Camel to the output transport).  

[i.e. Javadoc: 
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html
<http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html>

]

Hence, there may not be a need to create a custom spring bean scope that has
that same lifespan.

I've converted my (route-specific) service beans to be Spring prototype
beans, and now use Exchange properties (i.e. custom, per-route properties
that my routes then use) to store all intermediate results.  

By using ONLY the Exchange properties to store state, the (route-specific,
Spring) service beans become stateless.

So far, it looks good.

Much obliged for all the help.




--
View this message in context: http://camel.465427.n5.nabble.com/Claus-Need-better-understanding-of-Camel-bean-tag-usage-with-Spring-prototype-beans-tp5756009p5756292.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message