Hi all ,

   I am using RedHat6.1 , jdk1.3 and jboss2.1. 
   Recently i have been trying to access database connection from
binding datasource in jboss.
   The error is "NamingNotFoundException error"
   
   Can we accessed jndi that binding in jboss outside ejb bean ?? Thanks
wt

   below is my code :

   public static void main(String [] args){
 
     try{  
      Properties props = new Properties();
      props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
      props.put(Context.PROVIDER_URL, "localhost:1099");  
      Context ctx = new InitialContext();

      ds = (DataSource)ctx.lookup("java:comp/env/jdbc/PostgresDS");
     }
     catch(Exception e){}   
  
    }

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to