What are the Advantages of using JNDI in applications ?

JNDI allows dynamic configuration of applications and provides better portability of a J2EE application. Because JNDI is independent of any specific implementation, applications can use JNDI to access multiple naming and directory services, including existing naming and directory services such as LDAP, NDS, DNS, and NIS. This allows J2EE applications to coexist with legacy applications and systems.