2 Replies Latest reply on May 7, 2005 9:01 AM by Andy Nguyen

    jndi lookup of datasource: broken in jboss 4.x?

    Quentin Compson Newbie

      doesnt work for me & i fail to see the error here.

      jdk 1.4.x



      <?xml version="1.0" encoding="UTF-8"?>

      <?xml version="1.0" encoding="UTF-8"?>

       <description>The default DS</description>

      java code
      Context initCtx = new InitialContext();
      Context envCtx = (Context) initCtx.lookup("java:comp/env");
      DataSource ds = (DataSource) envCtx.lookup("jdbc/dev);
      conn = ds.getConnection();


      im sure it would work if i did the lookup the jboss way, but this should really be portable across containers (the java code does work in tomcat 5.x).

      yes, i can see the mbean & ive tried all sorts of ways to get this to work, so if anyone knows the answer to this, please let me know.

      i like jboss but this is just stupid--maybe im missing something, but it shouldn't be this much of a hassle. judging by the number of posts on this subject & the jca moderator's comments, it appears that im not the only one having this problem.