Bug 969011 - SwitchYard bean services are not properly integrated with CDI support in JBDS
SwitchYard bean services are not properly integrated with CDI support in JBDS
Status: CLOSED CURRENTRELEASE
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Tooling (Show other bugs)
6.0.0 GA
Unspecified Unspecified
unspecified Severity unspecified
: ER1
: ---
Assigned To: Rob Cernich
Jiri Pechanec
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-30 09:18 EDT by Jiri Pechanec
Modified: 2014-06-16 19:53 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker SWITCHYARD-1516 Major Closed Integrate SY tools with Eclipse CDI tools 2014-06-16 19:53:55 EDT

  None (edit)
Description Jiri Pechanec 2013-05-30 09:18:20 EDT
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
Comment 1 JBoss JIRA Server 2013-05-31 13:39:03 EDT
Rob Cernich <rcernich@redhat.com> updated the status of jira SWITCHYARD-1516 to Coding In Progress
Comment 2 JBoss JIRA Server 2013-05-31 17:58:51 EDT
Rob Cernich <rcernich@redhat.com> 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).
Comment 3 JBoss JIRA Server 2013-06-03 09:30:05 EDT
Keith Babo <kbabo@redhat.com> 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.
Comment 4 JBoss JIRA Server 2013-06-03 09:39:15 EDT
Rob Cernich <rcernich@redhat.com> 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.
Comment 5 JBoss JIRA Server 2013-06-03 10:11:25 EDT
Rob Cernich <rcernich@redhat.com> 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.
Comment 6 JBoss JIRA Server 2013-06-03 10:29:04 EDT
Keith Babo <kbabo@redhat.com> made a comment on jira SWITCHYARD-1516

pushed
Comment 7 Jiri Pechanec 2013-09-17 06:37:15 EDT
Verified in ER2
Comment 11 JBoss JIRA Server 2014-06-16 19:53:55 EDT
Keith Babo <kbabo@redhat.com> updated the status of jira SWITCHYARD-1516 to Closed

Note You need to log in before you can comment on or make changes to this bug.