camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendan Long <bren...@realgo.com>
Subject Re: Spring vs Java DSL
Date Fri, 14 Oct 2011 18:45:24 GMT
On 2011-10-14 11:59 AM, diwakar wrote:
> Which is better? Can everything be done in both. 
> One drawback with Java is, it can not be opened in Fuse
> Camel Editor.

I've found the Java one easier to use, because Eclipse will
auto-complete and show JavaDocs. There are also some things that require
significantly more code in the Spring version, like simple Processors:

    from("somewhere")
    .process(new Processor() {
        public void process(Exchange e) {
            // way more power here than in the Spring DSL
        }
    })
    .to("somewhere else");

You also get the advantage that (some) bad routes will fail at
compile-time instead of runtime.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message