The javax.naming package contains the JNDI API. Since this is just an API, not an implementation, you need to tell which JNDI implementation to use. Implementations are usually specific to the server you are trying to talk to.
To specify an implementation, you pass a Properties object when you create an InitialContext . These properties determine the implementation used, as well as the location of the server. By default, the InitialContext constructor is only useful if you have system properties, but the properties are the same as if you were passing them manually.
As for the properties that need to be set, it depends on your server. You need to track these settings and connect them.
skaffman Jan 01 '09 at 17:33 2010-01-01 17:33
source share