What is the purpose of JNDI
How can you realize the usage of JNDI , with an example if possible? JNDI is the Java Naming and Directory Interface. It's used to separate the concerns of the application developer and the application deployer . When you're writing an application which relies on a database, you shouldn't need to worry about the user name or password for connecting to that database. JNDI allows the developer to give a name to a database, and rely on the deployer to map that name to an actual instance of the database. For example, if you're writing code that runs in a Java EE container, you can write this to