On Sat, Jun 12, 2010 at 4:38 PM, M.Ismail <[email protected]> wrote:
>
> Hi All,
>
> I'm working on an integration with a TCP server and I want to save my login
> state (Logged/Not logged) in some variable or in the registry. For example,
> whenever I receive a message I may either login if I didn't do that before
> and then send the original message or I could simply forward the message to
> the server if I'm already logged in. I tried exchange.setProperty() but it
> can only store properties along a single flow i.e. after the message is sent
> to its destination and another one is received the property is gone!
>
> I'm using camel 2.3 and running it inside the spring container which is also
> my registry (is it read only? if not could someone tell me how to add to it
> in the runtime?).
>
> What do you suggest?
>

A bit like the Claim Check EIP pattern
http://camel.apache.org/claim-check.html

But in your case just create a bean which you use to store/retrieve
the login state.
Then add that as a spring bean and you can access this bean in the Camel routes.



> Thanks
> --
> View this message in context: 
> http://old.nabble.com/Saving-Login-state-in-the-route-tp28865247p28865247.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to