Hi Thanks for the sample code. I suspect we need to enh camel-cdi to scan for any managed beans for @Consume or something - haven't looked in the code. But it smells like it only does that for RouteBuilder classes.
Feel free to log a JIRA so we will get this sorted. On Mon, Jul 6, 2015 at 12:25 PM, Charlie Mordant <cmorda...@gmail.com> wrote: > Hi Claus, > > If you want to take a look at the (succeeding for RouteBuilder, failing for > others) sample: > > * The one failing (@Consume but that isn't RouteBuilder): > https://github.com/OsgiliathEnterprise/net.osgiliath.parent/blob/master/net.osgiliath.framework/net.osgiliath.features/net.osgiliath.feature.itests/net.osgiliath.feature.itest.messaging.cdi/src/main/java/net/osgiliath/messaging/cdi/repository/impl/HelloJMSCDIRepository.java > > * The one working (RouteBuilder): > https://github.com/OsgiliathEnterprise/net.osgiliath.parent/blob/master/net.osgiliath.framework/net.osgiliath.features/net.osgiliath.feature.itests/net.osgiliath.feature.itest.messaging.cdi/src/main/java/net/osgiliath/messaging/cdi/repository/impl/RouteConsumer.java > > * The according integration test: > https://github.com/OsgiliathEnterprise/net.osgiliath.parent/blob/master/net.osgiliath.framework/net.osgiliath.features/net.osgiliath.feature.itests/net.osgiliath.feature.itest.messaging.cdi/src/it/java/net/osgiliath/messaging/cdi/repository/impl/itests/ITHelloServiceJMS.java > > Its not minimal (we've got to extract a minimal sample to avoid having to > build the entire framework), but I can do it if you ask. > > Regards, > > 2015-07-06 11:25 GMT+02:00 Claus Ibsen <claus.ib...@gmail.com>: > >> Hi >> >> Are you able to build a little sample project? Also the bean you added >> @Consume does it have any cdi annotations so camel-cdi is able to >> manage it? That would be required for it to work. >> >> On Fri, Jul 3, 2015 at 12:53 PM, Ted <na...@pritchard.uk.net> wrote: >> > Hi Tchari, >> > >> > I'm having this same problem with CDI and a POJO consumer with an >> annotated >> > method @Consumer("direct:someEndpoint"). >> > >> > I get the error message "no consumers available on endpoint". >> > >> > I inspected the CDI registry (this.camelContext.getRegistry()) and I can >> see >> > my POJO is in the registry. >> > >> > Has anyone managed to resolve this or am I missing something? >> > >> > Thanks >> > >> > Ted >> > >> > >> > >> > -- >> > View this message in context: >> http://camel.465427.n5.nabble.com/Consuming-messages-in-camel-cdi-tp5748489p5768848.html >> > Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> Email: cib...@redhat.com >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> hawtio: http://hawt.io/ >> fabric8: http://fabric8.io/ >> > > > > -- > Charlie Mordant > > Full OSGI/EE stack made with Karaf: > https://github.com/OsgiliathEnterprise/net.osgiliath.parent -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/