Yes, camel 's OSGIServiceRegistry doesn't support filter yet; If your services use same interface, I think recipient list pattern cannot be used, directly;
Maybe you can write a custom processor to invoke osgi services by your self; But if you really like the bean feature supported by camel, you can temporary change the source code of rg.apache.camel.core.osgi.OsgiServiceRegistry.java which exists in camel-core-osgi component; For example: you can use a special split character in beanName to split osgi-service-class and filter condition; so the uri format may looks like as: "bean:test.TestClass|attr=xxx?method=.... " (I don't know if "|" can safely used in the uri , you can try it or some other character) And in OsgiServiceRegistry: you can change the source code , parse the split character in bean name to get osgi-service-name and filter; But anyway, this is only a temporary method; I don't know when camel will support osgi service ; the temporary method has such disadvantage: osgi-service must be started already, and cannot be dynamic; -----Original----- Sender: klausb [mailto:[email protected]] Date: 2010/12/16 0:42 Receiver: [email protected] Subject: Re: How to setup a dynamic route using beans in Java w/o having a spring ref to them? Now I'm puzzled. Did you say, that a bean is identified by its interface only? How can I setup a route that uses different beans, where all beans implement the same interface? klaus. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-setup-a-dynamic-route-using-beans-i n-Java-w-o-having-a-spring-ref-to-them-tp3304398p3306580.html Sent from the Camel - Users mailing list archive at Nabble.com.
