[Engine-devel] namingcontexts getting ignored.

Sharad Mishra snmishra at linux.vnet.ibm.com
Fri Apr 27 23:51:25 UTC 2012


Hi,

    I enter "getDefaultNamingContextFromNamingContexts()" with  
namingContexts set to -

namingcontexts: CN=SCHEMA, CN=LOCALHOST, CN=IBMPOLICIES, O=IBM.COM,  
O=DELETED.IBM.COM

    But this method only takes the first case "CN=SCHEMA" and ignores  
the rest. Actually I am interested in "O=IBM.COM".
    Is this working as designed or needs improvement?

-Sharad Mishra
IBM

public class RootDSEData {
     private String domainDN = null;
     private LdapProviderType ldapProviderType = null;
     private final static String RHDS_NAMING_CONTEXT = "o=netscaperoot";

     public static String  
getDefaultNamingContextFromNamingContexts(Attribute namingContexts) {
         for (int index = 0; index < namingContexts.size(); ++index) {
             String namingContext;
             try {
                 namingContext = (String) namingContexts.get(index);
             } catch (NamingException e) {
                 return null;
             }
             if (!RHDS_NAMING_CONTEXT.equalsIgnoreCase(namingContext)) {
                 return namingContext;
             }
         }
         return null;
     }




More information about the Devel mailing list