1 Reply Latest reply on Oct 23, 2007 8:23 AM by pmuir

    @Resource datasource injection

    nickarls

      Hi,

      Is the @Resource annotation supposed to work for POJOs also in Seam or is it an EJB-only thingie?

      I got the picture that if I have a datasource with <jndi-name>Foo</jndi-name>, I could just use

      @Resource(mappedName="Foo")
      private DataSource ds;


      and have it injected, however null is all I get. Or do I need some xml resource-refs also? Tried using name="Foo" an a combo of java:Foo, java:/Foo, java:/jdbc/Foo etc but still nulls.