6 Replies Latest reply on Mar 26, 2007 11:01 AM by Hugo

    Problem with @Resource and JBOSS

    tamri boss Newbie

      I have a sessionBean and a call a datasource so
      public DataSource myDB;
      when I run a jboss (jboss-4.0.4.CR2) it thows exception :

      java.lang.RuntimeException: You did not specify a @Resource.mappedName() on publ
      ic javax.sql.DataSource svr.SessionItemInfoBean.datasource and there is no bindi
      ng for that enc name in XML.

      after that I write @Resource(mappedName="DS"), this code shows that @Resource has't attribute mappedName.

      What can I do? I want to use @Resource to inject
      DataSource . Enyone knows how can I do?