One thing you might consider is to use a DTO or "shopping cart" as the body
of your messages to store the state and not use the Exchange itself.  

I'm fairly certain Claus isn't at odds with your impulse to use beans
independent of Camel as I think he even writes about that in his book.  So
at the beginning of your route you create a new data model that has
everything in it self-contained.

All your beans then simply use that DTO on their method invocations and they
can get/set any data or state that they want and not worry about thread
corruption.

If you are passing the Exchange into your beans you are still coupling to
the framework. These DTOs can be held, persisted or trashed independent of
any Camel concerns.  To Camel they are just the "body" carried along by the
exchange.



--
View this message in context: 
http://camel.465427.n5.nabble.com/EventNotifierSupport-and-Threads-tp5780279p5780375.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to