I have a JNDI named "MSSQLDS".
String jndiName = "MSSQLDS;
Context ctx = new InitialContext();
What is the difference between these 2 statements :
DataSource ds = (DataSource) ctx.lookup( "java:/" + jndiName );
or
DataSource ds = (DataSource) ctx.lookup( "java:comp/env/jdbc/" + jndiName );
How can I make sure which one will work for the jndiName?
Thanks
Rizwan
The first syntax is the old syntax. With the first syntax you can access the
global namespace. This is not available for all application servers. With
the second syntax you access the the mapped names of the Bean. You should
repeat your question in a forum to EJB

Signature
http://www.smallsql.de - the 100% pure Java DBMS with JDBC interface for
desktop applications
>I have a JNDI named "MSSQLDS".
>
[quoted text clipped - 13 lines]
>
> Rizwan