Hi Antonin! For #2, that's weird. What do you see in the output?
John On Feb 22, 2016 11:24, "Antonin Stefanutti" <anto...@stefanutti.fr> wrote: > Hi John, > > Good to hear from you here! Thanks for the thorough testing, that’s a good > catch. > > So I’ve looked into it and apparently the problem is two folds: > - The implementations do not assume the @Any qualifier by default for > programmatic lookup as they do for static injection. > - OpenWebBeans does not return the correct set of refined qualifiers when > calling InjectionPoint.getQualifiers in producer methods for Instance with > selected qualifiers. > > I have a fix for the former. I’ll polish it a bit and commit it ASAP. For > the later, I’ll report an issue in OWB JIRA and reactivate the test case > once it gets fixed. > > Antonin > > > On 22 Feb 2016, at 13:40, John D. Ament <johndam...@apache.org> wrote: > > > > Hi all, > > > > I was looking at the changes that went into Camel 2.17 with CDI injection > > support. It seems that injection support doesn't work consistently when > > done not using an annotated member. > > > > I tried a few different ways: > > > > @Inject > > @Any > > private Instance<Endpoint> endpointInstance; > > > > ... > > > > endpointInstance.select(MockEndpoint.class, new > > UriLiteral("mock:outgoing")).get() > > > > Which consistently gives back (in Weld 1.1.x, 2.x, OWB 1.2.x and OWB > 1.6.x) > > an error that no beans are defined, even though I have that endpoint > > defined. > > > > Now, if I try the CDI 1.1 way of using the utility class to look up the > > instance, it works fine in Weld 2.x but not OWB 1.6.x. As far as I know, > > this setup should work in both, and since I know I use pattern in other > > apps I don't think its a case of a bug in the impl. I was wondering if > any > > camel gurus could comment on it? > > > > > https://github.com/johnament/camel/commit/05dd5f6f8cda541fedfc68c6f199e014defe3f09 > > > > John > >