Details
-
Task
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
None
-
-
Empty show more show less
-
Empty show more show less
Description
Our ldap module support Context.REFERRAL ("java.naming.referral") property which indicate to the service providers how to handle referrals.
"When the LDAP service provider receives a referral despite your having set Context.REFERRAL to "ignore", it will throw a PartialResultException to indicate that more results might be forthcoming if the referral is followed. In this case, the server does not support the Manage Referral control and is supporting referral updates in some other way." http://docs.oracle.com/javase/jndi/tutorial/ldap/referral/jndi.html
For example Manage Referral control is not supported by Windows Active Directory.
But javax.naming.NamingEnumeration has two methods for determines if enumeration contains more elements java.util.Enumeration.nextElement() and javax.naming.NamingEnumeration.next(). next() method throw javax.naming.NamingException so also PartialResultException when server does not support the Manage Referral control, but nextElement() doesn't throw this exception and works with entry which is in different subtree then the one used as initialSearchAttributes. This behaviour is same for java.util.Enumeration.nextElement() and javax.naming.NamingEnumeration.next().
So we introduce new configuration property allowPartialResults (Configuration-modules/ldap/config/allowPartialResults). Property indicates which methods will be used. When property is set to true then hasMoreElements() and nextElement() methods are used. If property is set to false then hasMore() and next() are used. By default property is set to false.