camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
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 <micha89@gmail.com> 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: http://camel.465427.n5.nabble.com/camel-and-several-implementations-of-an-interface-tp5728298.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message