What is jndi?
Java
Naming and Directory Interface (JNDI) is an application programming interface
(API) for accessing directory services like LDAP.While JDBC can be used to access
a variety of relational databases, JNDI can be used to access a variety of
naming and directory services
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("jdbc/sampleDB");
Connection con = ds.getConnection("mukesh",
"mukesh");
No comments:
Post a Comment