camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: camel and several implementations of an interface
Date Fri, 01 Mar 2013 09:40:15 GMT
On Thu, Feb 28, 2013 at 3:42 PM, Smith-John <> wrote:
> Having a bundle with an interface and several implementations of it (all in
> their own bundle), how can I decide which bundle to call?
> Details:
> Bundle 1 just defines an interface. (packageName.InterfaceName)
> Bundle 2, 3 & 4 implement this interface.
> Problem is, with
>  .to("bean:packageName.InterfaceName?method=doIt")
> I just can set the interface. But how to decide which concrete
> implementation to call?
> (Working with Equinox)

The Camel osgi service registry from camel-core-osgi
(OsgiServiceRegistry) does not support that osgi ldap filter syntax,
so you cannot use that filter to select which impl to use.

You may need to do this manually using OSGi API and call the bean yourself.

Or if you use some spring-dm or osgi blueprint xml file, you can make
a <reference> in the XML and then Camel can use that reference as is
with the bean component.

> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message