camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Registry/Repository support in CAMEL
Date Mon, 01 Dec 2008 20:21:16 GMT
2008/12/1 S. Ali Tokmen <>:
> Hello
> James Strachan a écrit :
>> 2008/12/1 S. Ali Tokmen <>:
>>  BTW we've already got the Registry in CamelContext which wraps up
>> either JNDI or Spring. My first reaction was it might be worth looking
>> in that first before explicitly creating the endpoint; but I think the
>> default implementation of createEndpoint() will do that for you. e.g.
>> if you configured the endpoint "jms:someQueue" in Spring/Java/JNDI
>> then Camel should do the right thing I think so I don't think the
>> Registry component needs to worry about this.
> That's why it's not my Registry implementation does the lookup. It just
> fetches the technical name (for example, a JNDI name for a JMS queue) for a
> URI and then asks CAMEL to create an endpoint with that.
> The only "weird-looking" part is when I get the component based on the
> scheme...
>> Incidentally we have the ref component (RefComponent) which you could
>> maybe use to derive which could then use an alternative registry
>> implementation?
> That's a nice idea. The only limitation I see with it is that the registry's
> prefix would have to be set to "ref:", which is an acceptable one.
> How do I use the RefComponent?

Just refer to endpoints called "ref:someName" and it'll look up
"someName" in the registry (JNDI or Spring etc)

I guess all I really meant was we could derive from RefComponent so we
can reuse the sameURI mangling (removing the components scheme and
then calling some strategy method to allow derived classes to
transform the logical name to a physical name) then folks can have
multiple implementations of the strategy method; e.g. RefComponent
looks up an endpoint in the CamelContext's Registry (JNDI or Spring);
we could have a JNDIComponent which uses a configured JNDI context
which could work for LDAP etc. Ditto an OSGi component using the OSGi
registry etc.

No biggie though - however its implemented this sounds great :)


Open Source Integration

View raw message