-
Enhancement
-
Resolution: Fixed
-
P4
-
1.4.2, 5.0
-
tiger
-
generic
-
generic
The result of a directory search is returned as a NamingEnumeration of
javax.naming.directory.SearchResult entries. The SearchResult provides getName()
API to query the name of the entry that is either relative to the search context
or represents a URL. However users cannot query the full name (absolute name),
or distinguished Name (incase of LDAP) for the entry from the SearchResult class.
The JNDI tutorial recommends two alternate ways of getting the
full name:
1.Doing some book-keeping to keep track of the ancestors of the
SearchResult.
2.Using Context.getNameInNamespace(). This is done by setting the
SearchControl instance to return Object by a call to :
setReturningObjFlag(true)
And by casting the retrieved Object from the SearchResult to the
Context class.
The option #2 may not work if ObjectFactories are used, option #1 can be used always.
Many JNDI customers have given feedback on ###@###.### alias indicating that they prefer to use an API that directly gets them the
full name by querying the SearchResult class instead of round about ways.
Based on the popular demand for this API method on the jndi-interest alias, this RFE is filed to request adding a new API getNameInNamespace() to the
javax.naming.directory.SearchResult class in tiger.
javax.naming.directory.SearchResult entries. The SearchResult provides getName()
API to query the name of the entry that is either relative to the search context
or represents a URL. However users cannot query the full name (absolute name),
or distinguished Name (incase of LDAP) for the entry from the SearchResult class.
The JNDI tutorial recommends two alternate ways of getting the
full name:
1.Doing some book-keeping to keep track of the ancestors of the
SearchResult.
2.Using Context.getNameInNamespace(). This is done by setting the
SearchControl instance to return Object by a call to :
setReturningObjFlag(true)
And by casting the retrieved Object from the SearchResult to the
Context class.
The option #2 may not work if ObjectFactories are used, option #1 can be used always.
Many JNDI customers have given feedback on ###@###.### alias indicating that they prefer to use an API that directly gets them the
full name by querying the SearchResult class instead of round about ways.
Based on the popular demand for this API method on the jndi-interest alias, this RFE is filed to request adding a new API getNameInNamespace() to the
javax.naming.directory.SearchResult class in tiger.