1 Reply Latest reply on May 14, 2008 7:19 PM by Eric Smith

    Is there is any default Jndi name to use

    Paida Kumar Newbie

      javax.naming.InitialContext newInitialContext= new javax.naming.InitialContext();

      javax.naming.Context ctx=(Context)newInitialContext.lookup("java:comp/env");
      javax.sql.DataSource ds=(javax.sql.DataSource)ctx.lookup("java:MySqlDS");
      java.sql.Connection conn=ds.getConnection();

      is ther is any default ds to get the connetion ref..

      which jndi name I have to use to get the Datasource


        • 1. Re: Is there is any default Jndi name to use
          Eric Smith Newbie

          Assuming your question is about the portal since you posted in the Portal forum...the portal looks for a JNDI name of PortalDS.
          Take a look in your jboss portal zip for a setup directory. Looks like you are using mysql so look for file portal-mysql5-ds.xml. Make adjustments to that file and drop it in the jboss server deploy directory.