View RSS Feed

JNDI

How JNDI Names Work

Rate this Entry
by , 07-07-2012 at 04:15 PM (1037 Views)
Children name of any Context is being allowed to be listed by list() method. It has just been seen that children name could be listed of a Context when list() method is called by usage of empty string, as a parameter. Now let us assume again that Contextobject is there for naming the subdirectories which are present under javax.
Java Code:
NamingEnumeration childrenOfNaming = namingContext.list("");
Result that would come out would be NamingEnumeration which holds objects like NameClassPair presenting all naming children, including directory “directory”.

A name shall be passed to list() for listing the children names of arbitrary child of some context. Let us assume that directory children could be listed when string directory is being specified as parameter, to list():
Java Code:
NamingEnumeration childrenOfDirectory = namingContext.list("directory");
NamingEnumeration is the result which hold NameClassPair that present directory children.

Submit "How JNDI Names Work" to Facebook Submit "How JNDI Names Work" to Digg Submit "How JNDI Names Work" to del.icio.us Submit "How JNDI Names Work" to StumbleUpon Submit "How JNDI Names Work" to Google

Tags: jndi names Add / Edit Tags
Categories
Tutorial

Comments