When CDI support is enabled in JBDS then JBDS emits false warning about incorrect injections in these cases a) @Inject org.switchyard.Context emits - No bean is eligible for injection to the injection point [JSR-299 ยง5.2.1] b) @Inject @Reference SimpleService emits the same message. The problem is that @Reference is a CDI qualifier but of course there is no bean qualified with this qualifier as we annotate services with @Service annotation
Rob Cernich <rcernich> updated the status of jira SWITCHYARD-1516 to Coding In Progress
Rob Cernich <rcernich> made a comment on jira SWITCHYARD-1516 a) can be fixed by simply telling cdi to ignore validation. Should probably do the same for Message. b) is a bit tricky because there is not necessarily a corresponding @Service (e.g. if the service being referenced is implemented as a Camel route). Furthermore, it is possible that the service being injected implements a different, but compatible interface (e.g. WSDL vs. Java). As a bandaid, I can tell cdi to ignore validation of @Reference (and probably @Property too).
Keith Babo <kbabo> made a comment on jira SWITCHYARD-1516 I'm OK with (a) provided it only applies to our stuff. Not sure if that's possible. Yeah, the solution for (b) would have to synthesize a bean just for validation, sort of like we generate a proxy at runtime to satisfy the dependency.
Rob Cernich <rcernich> made a comment on jira SWITCHYARD-1516 Regarding (a), I don't think it's very likely that somebody would be implementing either Context or Message _and_ would be injecting those _and_ would have the SwitchYard tools installed. I don't think SwitchYard users should be implementing those interfaces, so we're probably safe telling the CDI tools to ignore validating those injection points. If we _really_ think we need this, I can see about disabling validation only for SY projects.
Rob Cernich <rcernich> made a comment on jira SWITCHYARD-1516 Tell CDI tools to ignore validation of injection points annotated with @Reference or @Property or of types org.switchyard.Context or org.switchyard.Message.
Keith Babo <kbabo> made a comment on jira SWITCHYARD-1516 pushed
Verified in ER2
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1516 to Closed