0 Replies Latest reply on Mar 20, 2006 12:42 PM by Pragada Srikanth

    res-ref-name problem

    Pragada Srikanth Newbie


      I am using a bmp where i want to use a res-ref-name as follows in the code:

      private Connection getConnection()
      throws SQLException
      InitialContext initCtx = null;
      try {
      initCtx = new InitialContext();
      DataSource ds = (javax.sql.DataSource) initCtx.lookup("java:comp/env/jdbc/oracle");
      return ds.getConnection();
      catch(NamingException ne)
      throw new EJBException(ne);
      if(initCtx != null) initCtx.close();
      catch(NamingException ne) { throw new EJBException(ne); }

      My ejb-jar.xml res-ref entries are as follows:


      My jboss.xml is a follows:

      I am not able to use the res-ref-name jdbc/oracle as shown in the code. Is java:comp/env/ is the prefix we use in JBoss. I used the same code previously with WLS 7.0 and it worked.

      Can any one help me to solve this problem?

      Thank you,
      Srikanth Pragada.