Description of problem: CDI injection of topic and queue does not work as expected Version-Release number of selected component (if applicable): JBoss-EAP-6.3.0-GA 1. Define a ConnectionFactory, Topic resources 2. Inject the defined resources to an JEE component 3. The ConnectionFactory gets injected as expected but the Topic (A self explanatory reproducer will be attached shortly.) Actual results: javax.jms.InvalidDestinationException: "Not a HornetQDestination:HornetQTopic" exception will be thrown Expected results: The JEE component should be able to access the injected destination successfully Additional info:
Created attachment 952788 [details] reproducer
There is a workaround for this, described here - using producer method instead of producer field: https://developer.jboss.org/thread/213568?tstart=0 @Resource(mappedName = "topic/EventTopic") private Topic topic; @Produces public Topic makeTopic() { return topic; } I'm not sure why the @Resource producer field doesn't work, and the producer method does.
Jozef Hartinger <jharting> updated the status of jira WELD-1782 to Reopened
Jozef Hartinger <jharting> updated the status of jira WELD-1782 to Resolved
Verified in EAP 6.4.0.DR12