camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hadrian Zbarcea <hzbar...@gmail.com>
Subject Re: [DISCUSS - Camel 2.0 - API] - Exchange as final, also eg to discourage custom Exchange implementations
Date Thu, 14 May 2009 15:19:38 GMT
I personally don't see a reason for a specialized Exchange.  We  
already *do* have specialized Messages and I think we should keep that  
(others have a different opinion).

CAMEL-1078, is implemented for the most part, I'll try to finish the  
remaining stuff, for the upcoming 2.0-M2.  In the meantime maybe we  
could clarify why Roman for instance thinks that we should not have  
specialized Messages and make a decision on that.

Hadrian


On May 14, 2009, at 4:41 AM, Claus Ibsen wrote:

> Hi
>
> Hadrian got the great idea (IMHO) to suggest that Exchange is final,
> so we only have DefaultExchange as the implementation.
>
> The ticket to track this is:
> http://issues.apache.org/activemq/browse/CAMEL-1078
>
> Even with James comment on the ticket I do feel that we should not
> allow custom Exchange implementation.
> The type safe getters for those specialized types can be added as the
> same way we do type safe headers.
>
> If we could come up with a good name:
> MySpecialObject foo =
> exchange.getSpecializedType(com.mycompany.MySpecialObject);
>
> But maybe we really dont need this as they can be part of the  
> Message instead.
> And of course we can have custom org.apache.Message types for eg JMS,
> File, CXF, and whatnot.
>
> What we can do is to see how far we can get and refactor and remove
> the custom Exchange we have in the Camel codebase.
> If possible there might be 1 or 2 custom types that need a bit more
> work to get it as DefaultExchange.
>
> And at that time we can check whether its possible to make Exchange
> final, and thus have paved the road for further optimizations in
> Camel.
>
> Any thoughts?
>
>
>
>
> -- 
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus


Mime
View raw message