9 Replies Latest reply on Nov 20, 2012 9:57 AM by jbertram

    Injection of JMS Queue fails


      Hi all !

      I have a Java EE 5 application which injects JMS Queues as resources


      @Resource(mappedName = "java:jboss/exported/jms/queue/mainQueue")

      private Queue queue;


      This works correctly on JBoss AS 7.1.1. However now I'm turning to Java EE 6 and CDI, so I've setup some Producers to create my resources


      public class ResourceProducer {


      @Produces  @Resource(mappedName = "java:jboss/exported/jms/queue/mainQueue")

      private Queue queue;


      . . . .



      which are later injected in CDI beans:



      private Queue queue;


      However now i get the following weird message:


      16:42:50,809 ERROR [stderr] (http- javax.jms.InvalidDestinationException: Not a HornetQ Destination:HornetQQueue[queue/mainQueue]

      16:42:50,811 ERROR [stderr] (http-   at org.hornetq.jms.client.HornetQSession.createProducer(HornetQSession.java:318)


      I've tested this against JBoss AS 7.1.1 and 7.2.0 Alpha1


      what could be the issue with it ? did I hit a bug  ?