0 Replies Latest reply on Mar 29, 2011 10:49 AM by fabriciolemos

    How to inject a custom resource?

    fabriciolemos
      Hello,

      What´s the best way for me to inject a custom resource through jnid? Weld docs says to use @Resource(lookup="myResource")

      but the javax.annotation.Resource does not have the property "lookup".

      I already tried with @Resource(name="myResource") and @Resource(mappedName="myResource") but none of them work.

      I know that the resource is there because new InitialContext().lookup("myResource") works fine.

      The Resource is of type String and was created in Glassfish 3.1 as a Custon Resource.