Package javax.naming.ldap

Examples of javax.naming.ldap.LdapContext.destroySubcontext()


    public void testThrowOnReferralWithJndi() throws Exception
    {
        LdapContext ctx = getWiredContextThrowOnRefferal( ldapServer );
       
        // delete success
        ctx.destroySubcontext( "ou=computers,uid=akarasulu,ou=users,ou=system" );
       
        try
        {
            ctx.lookup( "ou=computers,uid=akarasulu,ou=users,ou=system" );
            fail( "Should never get here." );
View Full Code Here


        }

        // referrals failure on delete
        try
        {
            ctx.destroySubcontext( "uid=akarasuluref,ou=users,ou=system" );
            fail( "Should never get here" );
        }
        catch ( ReferralException e )
        {
            // seems JNDI only returns the first referral URL and not all so we test for it
View Full Code Here

                try
                {
                    LdapContext modCtx = context.newInstance( controls );
                    modCtx.addToEnvironment( Context.REFERRAL, "throw" ); //$NON-NLS-1$

                    modCtx.destroySubcontext( dn );
                }
                catch ( NamingException ne )
                {
                    this.namingException = ne;
                }
View Full Code Here

                    // use "throw" as we handle referrals manually
                    modCtx.addToEnvironment( Context.REFERRAL, REFERRAL_THROW );

                    // delete entry
                    modCtx.destroySubcontext( new LdapName( dn ) );
                }
                catch ( ReferralException re )
                {
                    try
                    {
View Full Code Here

        else
        {
            fail( "entry " + rdn + " not found" );
        }
   
        ctx.destroySubcontext( rdn );
    }
   
   
    /**
     * Test case to demonstrate DIRSERVER-705 ("object class top missing in search
View Full Code Here

        else
        {
            fail( "entry " + rdn + " not found" );
        }
   
        ctx.destroySubcontext( rdn );
    }
   
   
    @Test
    public void testSubentryControl() throws Exception
View Full Code Here

            Attribute sn = sr.getAttributes().get( "sn" );
            assertNotNull( sn );
            assertTrue( sn.contains( "Bush" ) );
        }
   
        ctx.destroySubcontext( rdn );
    }
   
   
    /**
     * Create a person entry with multivalued Rdn and check its name.
View Full Code Here

        else
        {
            fail( "Entry not found:" + nameInNamespace );
        }
   
        ctx.destroySubcontext( rdn );
    }
   
   
    @Test
    public void testSearchJpeg() throws Exception
View Full Code Here

            Attribute cn = sr.getAttributes().get( "cn" );
            assertNotNull( cn );
            assertTrue( cn.contains( "Kate Bush" ) );
        }

        sysRoot.destroySubcontext( rdn );
    }


    /**
     * Tests the creation and subsequent read of a new JNDI context under the
View Full Code Here

        createEntries();

        /*
         * delete ou=testing00,ou=system
         */
        sysRoot.destroySubcontext( "ou=testing00" );

        try
        {
            sysRoot.lookup( "ou=testing00" );
            fail( "ou=testing00, ou=system should not exist" );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.