JNDI serves many uses, but it provides a common place for providing access to external resources.
eg In the cases where your application needs to access external resources which are not part of your application, and these resources may be used by other applications as well. Examples are Fax and email services, Database access, business processing (such as an EJB layer) and access to other middleware services.