Bug 969011 - SwitchYard bean services are not properly integrated with CDI support in JBDS
Summary: SwitchYard bean services are not properly integrated with CDI support in JBDS
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Tooling
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER1
: ---
Assignee: Rob Cernich
QA Contact: Jiri Pechanec
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-30 13:18 UTC by Jiri Pechanec
Modified: 2014-06-16 23:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SWITCHYARD-1516 0 Major Closed Integrate SY tools with Eclipse CDI tools 2014-06-16 23:53:55 UTC

Description Jiri Pechanec 2013-05-30 13:18:20 UTC
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 17:39:03 UTC
Rob Cernich <rcernich> updated the status of jira SWITCHYARD-1516 to Coding In Progress

Comment 2 JBoss JIRA Server 2013-05-31 21:58:51 UTC
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).

Comment 3 JBoss JIRA Server 2013-06-03 13:30:05 UTC
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.

Comment 4 JBoss JIRA Server 2013-06-03 13:39:15 UTC
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.

Comment 5 JBoss JIRA Server 2013-06-03 14:11:25 UTC
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.

Comment 6 JBoss JIRA Server 2013-06-03 14:29:04 UTC
Keith Babo <kbabo> made a comment on jira SWITCHYARD-1516

pushed

Comment 7 Jiri Pechanec 2013-09-17 10:37:15 UTC
Verified in ER2

Comment 11 JBoss JIRA Server 2014-06-16 23:53:55 UTC
Keith Babo <kbabo> 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.