[jbosstools-issues] [JBoss JIRA] (JBIDE-15507) Support injection of JMSContext

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Tue Sep 24 17:34:45 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-15507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12807039#comment-12807039 ] 

Viacheslav Kabanovich edited comment on JBIDE-15507 at 9/24/13 5:33 PM:
------------------------------------------------------------------------

Project wildfly-messaging has producer method org.jboss.as.messaging.deployment.JMSContextProducer.getJMSContext(InjectionPoint)
that produces bean JMSContext. 

However, JBoss Tools CDI model cannot detect this bean because wildfly-messaging has in classpath CDI API of 1.1 version and has no beans.xml, which makes bean archive wildfly-messaging an implicit bean archive by CDI 1.1 spec, hence only beans in managed bean classes with scope annotations are to be detected. Class JMSContextProducer has no explicit scope annotation.

Have I misunderstood bean detection? How this producer is detected by CDI runtime 1.1?
                
      was (Author: scabanovich):
    Project wildfly-messaging has producer method org.jboss.as.messaging.deployment.JMSContextProducer.getJMSContext(InjectionPoint)
that produces bean JMSContext. 

However, JBoss Tools CDI model cannot detect this bean because wildfly-messaging has in classpath CDI API of 1.1 version and has no beans.xml, which makes bean archive wildfly-messaging an implicit bean archive by CDI 1.1 spec, hence only beans in managed bean classes with scope annotations are to be detected.

Have I misunderstood bean detection? How this producer is detected by CDI runtime 1.1?
                  
> Support injection of JMSContext
> -------------------------------
>
>                 Key: JBIDE-15507
>                 URL: https://issues.jboss.org/browse/JBIDE-15507
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: cdi, cdi-extensions
>    Affects Versions: 4.1.0.Final
>            Reporter: Xavier Coulon
>            Assignee: Viacheslav Kabanovich
>              Labels: new_and_noteworthy
>             Fix For: 4.2.0.Alpha1
>
>
> if I try to inject a JMSContext (part of JMS 2.0 in JavaEE7) into a bean (CDI bean or EJB):
> @Inject
> JMSContext context;
> I get the following warning:  "No bean is eligible for injection to the injection point [JSR-299 §5.2.1]". 
> Yet, there's no problem when I deploy the application on Wildfly (8.0.0.Alpha4, the latest release so far)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jbosstools-issues mailing list