On Mon, Dec 5, 2011 at 2:07 PM, Christian Schneider
<[email protected]> wrote:
> Some time ago I did some unification in CXF to make it easier for users to
> configure the different http transports.  I would like to do a similar thing
> for camel.
>
> Currently we have three different http components:
>
> camel-http : Only producer
> camel-jetty : Only consumer with embedded jetty
> camel-servlet : Only consumer with servlet from servlet container or OSGi
> Server
>
> This means people have to use three different prefixes.
>
> I would like to change this to only use the prefix http.
>
> Producer:
> to("http://myserver/mypath";)
>
> Servlet consumer:
> from("/myservlet/mypath")
>
> Jetty consumer:
> from("http://myserver:myport/mypath";)
>
> The idea is to select the Endpoint type based on the URI and endpoint type
> but to hide this from the user.
>

This is not a good idea.

We have 5 http component with Camel
- http
- http4
- jetty
- servlet
- ahc

Some supports producer only, consumer only, or both


Also this would deviate from how endpoints and components works in Camel.
The scheme always refer to the component name. So its easy to remember.


For example in you example

from("/foo/bar")

What does this refer to? You say its a servlet. But for others this
could just as well look like a file path.

So having to explicit define the component makes it all clear to the reader
from("servlet:/foo/bar")
from("file:/foo/bar")


Also when you must define a component name, then there will be no
clashes in the future, as the component name is unique.





> Christian
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to