8 Replies Latest reply on Nov 4, 2005 11:14 AM by dornus

    EJB 3.0 RC3 Gives me messageName errrors

    dornus Novice

      I have just upgraded my 4.0.2 to use EJB3RC3.

      In doing so, I now get the following errors with my code.

       @Resource(name = "Blah" )
       QueueConnectionFactory factory;
      

      You did not specify a
      @Resource.mappedName() on 'myClass' and there is no binding for that enc name in XML
      


      so, the logical thing to do would be this.
       @Resource(name = "Blah" mappedName="blah2" )
       QueueConnectionFactory factory;
      


      However, this gives me a syntax error. I don't know how to put 2 properties (name,mappedName) within the resource tag.

      so I did this
       @Resource(mappedName="blah2" )
       QueueConnectionFactory factory;
      


      and obviously it gave me jndi lookup errors.

      I cannot find any documentation on what mappedName is and how to use it. Is it a name I give it, or is it some specific name like javax.Queue?

      Can anyone post an example of what it is and how to properly use it?