camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trivedi kumar b <Trivedi.Bodlap...@ge.com>
Subject Accessing exchange from producer template
Date Wed, 09 Dec 2009 03:07:20 GMT

Hi,

I have a bean that is being invoked from a route and this bean has got
producer template.. and I want the access to exchange object to retrieve
properties that is being set before in the route. So I have written a small
piece of code (method) that returns me the exchange object.. pls let me know
if there is a better to get the exchange object.

private Exchange getExchange() {
        Exchange exchange = template.send(new Processor() {
            public void process(Exchange arg0) throws Exception { }            
        });
        return exchange;
    }
-- 
View this message in context: http://old.nabble.com/Accessing-exchange-from-producer-template-tp26704478p26704478.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message