users@glassfish.java.net

Accessing JNDI Namespace- Application Client Container - SunOne

From: <glassfish_at_javadesktop.org>
Date: Wed, 29 Jul 2009 21:29:53 PDT

Hi

I am facing a problem when trying to access the JNDI namespace from Application client. The error in the console says

[b]javax.naming.NameNotFoundException: testingName not found[/b]

From the application code, i am trying to access the jndi name jdbc/testingName through initailLookup.

           InitialContext ctx = new InitialContext();
           DataSource ds = (DataSource) ctx.lookup("jdbc/testingName");
           conn = ds.getConnection();

I am using Linux, SunOne Application Server.

Any help is appreciated.
Thanks in advance.
[Message sent by forum member 'banunishat' (banunishat)]

http://forums.java.net/jive/thread.jspa?messageID=358160