JDK-4812519 : Add an API method to get the full name of the search result
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: javax.naming
  • Affected Version: 1.4.2,5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-02-04
  • Updated: 2017-05-16
  • Resolved: 2003-05-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Description
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.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b08
02-09-2004

EVALUATION Requires a CCC request as this is an enhancement of the existing API.
02-09-2004