I should have added a link to some test cases to give you an idea of
how to use them...

Here's an example of using the "binding:nameOfBinding:endpointURI" approach:
http://svn.apache.org/viewvc/camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonNameBindingTest.java?revision=1400019&view=markup

and here's an example of using a BindingComponent to make a new kind
of endpoint (jsonmq) which has the binding
http://svn.apache.org/viewvc/camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonBindingTest.java?revision=1400019&view=markup

On 19 October 2012 11:13, James Strachan <james.strac...@gmail.com> wrote:
> Inspired by the SwitchYard project and how it uses contracts in SCA, I
> thought I'd take a stab at adding something vaguely similar to Camel;
> to allow us to add bindings to an endpoint (e.g. ensuring a particular
> Data Format is used in or out of the endpoint, to add a validation
> step , add transactions or whatnot).
>
> It turned out to be really simple ;) there's not really much in the
> way of code; its more a new concept (rather like the introduction of
> Data Format a long time ago). I've tried to document what Bindings are
> and how they can be used - and when to use them or not...
> https://cwiki.apache.org/confluence/display/CAMEL/Binding
>
> I'm not sure how big a deal they are in general to Camel folks; if you
> only use an endpoint once inside a route and the route isn't used or
> shared by anything else, they are not that useful really. But I can
> see them being useful when folks have lots of endpoints; or wish to
> pass endpoints into and out of composite routes etc.
>
> So far there's only one Binding implementation ;) the
> DataFormatBinding which was pretty trivial to implement.
> http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/binding/DataFormatBinding.java?revision=1400019&view=markup
>
> Am sure we could hack up others for Java type conversion, XSD
> validation or WSDL contract enforcement or whatnot.
>
> We could also add a little bit of syntax sugar in the Java/XML DSLs to
> make them a little more DRY to use.
>
> Thoughts?
>
> --
> James
> -------
> Red Hat
>
> Email: jstra...@redhat.com
> Web: http://fusesource.com
> Twitter: jstrachan, fusenews
> Blog: http://macstrac.blogspot.com/
>
> Open Source Integration



-- 
James
-------
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration

Reply via email to