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

    Injection of JMS Queue fails

    Max Korn Newbie

      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:

       

      @Inject

      private Queue queue;

       

      However now i get the following weird message:

       

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

      16:42:50,811 ERROR [stderr] (http-127.0.0.1/127.0.0.1:8080-1)   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  ?

      Thanks

      Max