camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ranx <>
Subject Re: EventNotifierSupport and Threads
Date Sun, 03 Apr 2016 16:40:24 GMT
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

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

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message