1 Reply Latest reply on Nov 24, 2008 1:24 AM by jaikiran pai

    Why java:comp/env/jdbc/DataSource does not work?

    Eugene Torkhov Newbie

      Sorry, very stupid question.

      When I describe my database as simple word, like:


      all works fine as ctx.lookup("java:DataSource");

      but in other application servers (for ex. Weblogic) my DataSource resource achieved thru ctx.lookup("java:comp/env/jdbc/DataSource")

      so, I want compatibility and if I describe my database like


      I see in logs that it mapped to java:comp/env/jdbc/DataSource
      but trying to lookup as "java:comp/env/jdbc/DataSource" was failed with exception.

      How I can force JBoss AS to lookup java:comp/env/jdbc/DataSource resource?