You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Claus Ibsen <ci...@silverbullet.dk> on 2008/04/07 15:02:45 UTC

Camel component prefix how does Camel resolve it

Hi

 

I am working on CAMEL-447 to update our component so its up-to-date and that we have all the URI protocol prefixes (tcp, mina, seda, direct etc.) that does all the magic discovey of the component to use.

 

There are some gaps on the list as I wanted to

-        add what artifcat or whatever camel-xxx.jar you need to use this component, so I added a column for this

-        add missing components or protocol prefixes that are missing for the existing components.

 

Since I could not find a suited component for esper and fix etc. (TODO on the list) I was quickly trying to find out how Camel does the trick to know what to do.

Anyone with the knowledge care to elaborate how its done?

 

I know about the special marker files in the META-INF/services/.../component folder.

But since there is no esper, fix etc. file I was wondering how this works.

 

Also how does it works for some of the camel-jms stuff so it knows that activemq is jms etc?

 

The component list with the new columns is here:

http://cwiki.apache.org/confluence/display/CAMEL/Component+List

 

 

 

Med venlig hilsen

 

Claus Ibsen

......................................

Silverbullet

Skovsgårdsvænget 21

8362 Hørning

Tlf. +45 2962 7576

Web: www.silverbullet.dk

 


Re: Camel component prefix how does Camel resolve it

Posted by James Strachan <ja...@gmail.com>.
On 07/04/2008, Claus Ibsen <ci...@silverbullet.dk> wrote:
> Hi
>
>  I am working on CAMEL-447 to update our component so its up-to-date and that we have all the URI protocol prefixes (tcp, mina, seda, direct etc.) that does all the magic discovey of the component to use.
>
>  There are some gaps on the list as I wanted to
>
>  -        add what artifcat or whatever camel-xxx.jar you need to use this component, so I added a column for this

I wonder if it'd make sense to write a little maven plugin which
searches all camel jars on the classpath (so we could run it in the
assembly module - the camel/apache-camel/pom.xml) - which looked for
all the component files in the
META-INF/services/org/apache/camel/component/* directory, then output
a list of the component schemes and the jars which they depend on?


>  -        add missing components or protocol prefixes that are missing for the existing components.
>
>  Since I could not find a suited component for esper and fix etc. (TODO on the list) I was quickly trying to find out how Camel does the trick to know what to do.

The esper page should describe that this component is provided by the
separate Camel Extra project...
http://activemq.apache.org/camel/esper.html

which is a separate project due to product licensing (being *GPL based).



>  Anyone with the knowledge care to elaborate how its done?
>
>  I know about the special marker files in the META-INF/services/.../component folder.
>
>  But since there is no esper, fix etc. file I was wondering how this works.

Its not that well documented but this page might help...
http://activemq.apache.org/camel/writing-components.html

But yes you found it. Camel also looks first in the Registry
http://activemq.apache.org/camel/registry.html

so you could wire the component in via Spring for example.


>  Also how does it works for some of the camel-jms stuff so it knows that activemq is jms etc?
>

Inside activemq-core.jar there's an activemq META-INF/services file
which creates an ActiveMQComponent which extends the JmsComponent

>  The component list with the new columns is here:
>
>  http://cwiki.apache.org/confluence/display/CAMEL/Component+List

Great stuff! :)
-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com