1 Reply Latest reply on Dec 18, 2006 6:49 AM by Vinutha GR

    How to Create a New Jndi

    Anil Karumanchi Newbie

      Hi
      Im Working in JBoss portals .. i want to connect to the database. for that i was created *-ds.xml file .. with in that i mentioned database stuff.. then i was called that the JNDI name in my portlet like

      in myportlet.xml

      InitialContext ctxt = new InitialContext();
      DataSource ds = (DataSource)ctxt.lookup("PortalDS");
      Connection conn = ds.getConnection();

      in oracle-ds.xml

      <local-tx-datasource>
      <jndi-name>PortalDS</jndi-name>
      <connection-url>jdbc:oracle:thin:@10.43.68.23:1621:MDBDATA</connection-url>


      tell me what to do in web.xml and in the remaining files(jboss-web.xml)

      here im getting javax.naming.nanenotfound Exception.. plz send me quick reply..


      Thanx in Advance