camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulliard <cmoulli...@gmail.com>
Subject RE: Annotation @Exchange planned in a future release ?
Date Thu, 10 Jul 2008 10:27:20 GMT

Claus,

The way that we implement the class is not the same when you compare both
approaches

1) Without annotation

The bean implements the interface Processor and retrieves the Exchange
object through the method : process(Exchange ex)

2) Using annotation

the bean does not implement the processor so it is not possible to retrieve
the Exchange except if we inject it through additional annotation 

Regards

Charles



Claus Ibsen wrote:
> 
> Hi
> 
> I think you can do like this
> 
> public Exchange doSomething(Exchange exchange) {
>    ...
>    return exchange;
> }
> 
> So the @Exchange annotation is not really neeed IMHO. As its not a common
> class such as java.lang.String etc.
> 
> And I also think you can do return a String etc. instead of Exchange for
> just the playload in the message. But I am not 100% sure.
> 
> 
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> 
> -----Original Message-----
> From: cmoulliard [mailto:cmoulliard@gmail.com] 
> Sent: 10. juli 2008 11:34
> To: camel-user@activemq.apache.org
> Subject: Annotation @Exchange planned in a future release ?
> 
> 
> Hi,
> 
> Is it planned in a future release of Camel to also have the annotation
> @Exchange available inside the bean component ?
> 
> I ask you that question because when you want inside a bean to perform by
> example a in.getOut().setHeader("", ""), you need to have access to the
> Exchange object. The annotation allow to receive the @Properties, @Headers
> and @Body but no the exchange.
> 
> Regards,
> 
> Charles
> -- 
> View this message in context:
> http://www.nabble.com/Annotation-%40Exchange-planned-in-a-future-release---tp18379161s22882p18379161.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Annotation-%40Exchange-planned-in-a-future-release---tp18379161s22882p18379983.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message