0 Replies Latest reply on Jun 3, 2008 8:14 AM by Sergey Savenkov

    Problem with @Resource and JBoss Web

    Sergey Savenkov Newbie

      Hi,

      I have JBoss Web (jboss-web-2.1.0.GA) and JSF Web Application.
      There is one prolema:

      "@Resource(name = "jdbc/SA_Oracle")
      private DataSource jdbcSA_Oracle;" not work,

      but

      "Context initCtx = new InitialContext();
      Context envCtx = (Context) initCtx.lookup("java:comp/env");
      DataSource ds = (DataSource) envCtx.lookup("jdbc/SA_Oracle");" all ok!

      What could be the problem?

      Thanks,
      Sergey.