if (principal.length()>0){
principal = principal +","+ defaultProperties.getProperty(BASE_DN_PROP);
}
} else {
//if the item is found followin a referral an URL string is returned which can not be used as principal
LdapURL ldapurl = new LdapURL(principal);
principal = ldapurl.getDN();
}
}
else {
// 3. Principal is constructed from properties
principal = constructPrincipal(getLdapId());