directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Pbs with the JNDI layer referral handling
Date Thu, 25 Sep 2008 20:27:48 GMT
Hi guys

I'm currently trying to re-inject referral handling in core-jndi, so 
that the JNDI provider works correctly when referrals are stored in the 
server (The ReferralITest have been unactivated in the core-integ 
pom.xml until now).

I have a problem with a test where we create a context and get a 
referral. the check expect the URL to be relatives to the current contex :

    private void checkParentReferrals( ReferralException e ) throws 
Exception
    {
        assertEquals( "ldap://fermi:10389", e.getReferralInfo() );
        assertTrue( e.skipReferral() );
        assertEquals( 
"ldap://hertz:10389/cn=alex%20karasulu,ou=users,dc=example,dc=com", 
e.getReferralInfo() );
        assertTrue( e.skipReferral() );
        assertEquals( "ldap://maxwell:10389", e.getReferralInfo() );
        assertFalse( e.skipReferral() );
    }

The stored URLs in the ref attribute are :
    ref: ldap://fermi:10389/ou=users,ou=system
    ref: ldap://hertz:10389/ou=users,dc=example,dc=com
    ref: ldap://maxwell:10389/ou=users,ou=system

As you can see, the URLs have been stripped from the ou=users,ou=system 
in the checkParentReferrals test.

It seems to conflict with the JNDI tutorial :
http://java.sun.com/products/jndi/tutorial/ldap/referral/follow.html

where the returned URLs are not modified.

Am I wrong, or is the check incorrect ?

Thanks !

-- 
--
cordialement, regards,
Emmanuel L├ęcharny
www.iktek.com
directory.apache.org



Mime
View raw message