[jboss-user] [JNDI/Naming/Network] - connect to defaultds

AJanz do-not-reply at jboss.com
Thu May 8 12:08:34 EDT 2008


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149513#4149513

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149513



More information about the jboss-user mailing list