4 Replies Latest reply on May 9, 2008 7:27 AM by ajanz

    connect to defaultds

    ajanz

      hi

      i am trying to connect to the defaultds. but i got the error "DefaultDS not bound"

      when i use the jndiview from web-console i see that it is there....

      i use the following code, what am i doing wrong?

       Hashtable<String, String> env;
       env = new Hashtable<String, String>();
       env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
       env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jn.interfaces");
       env.put("java.naming.provider.url","jnp://localhost:1099");
       Context initContext = new InitialContext(env);
       DataSource ds = (DataSource)initContext.lookup(dataSourceName);
      


      server runs in a seperate window.

      my code is executed with eclipse