0 Replies Latest reply on May 8, 2013 8:21 AM by Alphonse Bendt

    How can i map java:/queues/myQueue to java:comp/env/myQueue

    Alphonse Bendt Newbie

      Hi all,


      i'm currently porting an application to JBoss AS 7.


      The old code accesses Ressources using @Resource:



      @Resource(mappedName = "myQueue")
      Queue myQueue;


      I tried to use jboss-ejb3.xml to set up a mapping from the specified name to the actual JNDI name. Unfortunately i was unable to find a working configuration.

      I have tried various combinations of using the name/mappedName attribute of @Resource and also tried "myQueue" and "java:comp/env/myQueue" as value.

      I have set up a test project: https://github.com/abendt/jboss-as7-jndinames which contains the tests i have made.


      Here are some EJB's using the @Resource annotation:






      any help appreciated!


      best regards,

         Alphonse Bendt