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

    connect to defaultds

    Sascha Janz Master


      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");
       Context initContext = new InitialContext(env);
       DataSource ds = (DataSource)initContext.lookup(dataSourceName);

      server runs in a seperate window.

      my code is executed with eclipse