Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4812519

Add an API method to get the full name of the search result

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 5.0
    • 1.4.2, 5.0
    • core-libs
    • 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.

            jhangalsunw Jayalaxmi Hangal (Inactive)
            jhangalsunw Jayalaxmi Hangal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: