We use Message or Exchange to set the outbound message . the only method these provide is
exchange.getOut.setBody();
if i do something like setBody(new Object())..it doesn't work
so how do we send java objects via camel exchange.
We use Message or Exchange to set the outbound message . the only method these provide is
exchange.getOut.setBody();
if i do something like setBody(new Object())..it doesn't work
so how do we send java objects via camel exchange.
And setting a payload as new Object() just means you send an empty object. And if you want serialized objects, then you object must be serializable such as implementing java.io.Serializable
And where do you route the message afterwards?
I am really glad Claus Isben has replied(attended the "Intro to camel webinar"). sorry for the newbie question...i sent the serialized object as e.getOut().setBody(new Object()); and got it working fine via typecasting in the recieving bean as (Object) e2.getIn().getBody();.my camelcontext was this ...which worked fine outputting messages at fixed intervals.But all hell broke loose when i changed my camelcontext to this ..it was spamming lot of message's.So,what exactly Does above route do ? And can u please answer below few questions.. 1) in the bean "send" for the URI ...how do u send outbound message's without using Exchange as a parameter in the send() method..is their anyway to do this(any annotation?).I am using Spring Xml to route. 2)What exactly does the Log component do ? Does it only log virtually.is there no physical side to it ?
Many thanks