Package javax.naming.event

Examples of javax.naming.event.EventDirContext.createSubcontext()


        Attributes testEntry = LdifUtils.createAttributes(
            "objectClass: top",
            "objectClass: organizationalUnit",
            "ou", "testentry" );

        ctx.createSubcontext( "ou=testentry", testEntry );

        //  Wait 1 second, as the process is asynchronous
        Thread.sleep( 1000 );

        assertEquals( 1, listener.getEventRecords().size() );
View Full Code Here


        rec = ( EventRecord ) listener.getEventRecords().get( 0 );
        assertEquals( "objectAdded", rec.method );
        assertEquals( ctx, rec.event.getSource() );

        // read the entry once again just to make sure
        ctx.createSubcontext( "ou=testentry", testEntry );
       
        //  Wait 1 second, as the process is asynchronous
        Thread.sleep( 1000 );

        assertEquals( 1, listener.getEventRecords().size() );
View Full Code Here

        Attributes testEntry = LdifUtils.createAttributes(
            "objectClass: top",
            "objectClass: organizationalUnit",
            "ou", "testentry" );

        ctx.createSubcontext( "ou=testentry", testEntry );

        //  Wait 1 second, as the process is asynchronous
        Thread.sleep( 1000 );

        assertEquals( 1, listener.getEventRecords().size() );
View Full Code Here

        assertEquals( 1, listener.getEventRecords().size() );
        rec = ( EventRecord ) listener.getEventRecords().get( 0 );
        assertEquals( "objectAdded", rec.method );

        // readd the entry once again just to make sure
        ctx.createSubcontext( "ou=testentry", testEntry );
       
        //  Wait 1 second, as the process is asynchronous
        Thread.sleep( 1000 );

        assertEquals( 1, listener.getEventRecords().size() );
View Full Code Here

        ctx.addNamingListener( "", SearchControls.SUBTREE_SCOPE, listener );
        Attributes testEntry = new BasicAttributes( "ou", "testentry", true );
        Attribute objectClass = new BasicAttribute( "objectClass", "top" );
        objectClass.add( "organizationalUnit" );
        testEntry.put( objectClass );
        ctx.createSubcontext( "ou=testentry", testEntry );

        //  Wait 1 second, as the process is asynchronous
        Thread.sleep( 1000 );

        assertEquals( 1, listener.getEventRecords().size() );
View Full Code Here

        rec = ( EventRecord ) listener.getEventRecords().get( 0 );
        assertEquals( "objectAdded", rec.method );
        assertEquals( ctx, rec.event.getSource() );

        // read the entry once again just to make sure
        ctx.createSubcontext( "ou=testentry", testEntry );
       
        //  Wait 1 second, as the process is asynchronous
        Thread.sleep( 1000 );

        assertEquals( 1, listener.getEventRecords().size() );
View Full Code Here

        ctx.addNamingListener( "", SearchControls.SUBTREE_SCOPE, listener );
        Attributes testEntry = new BasicAttributes( "ou", "testentry", true );
        Attribute objectClass = new BasicAttribute( "objectClass", "top" );
        objectClass.add( "organizationalUnit" );
        testEntry.put( objectClass );
        ctx.createSubcontext( "ou=testentry", testEntry );

        //  Wait 1 second, as the process is asynchronous
        Thread.sleep( 1000 );

        assertEquals( 1, listener.getEventRecords().size() );
View Full Code Here

        assertEquals( 1, listener.getEventRecords().size() );
        rec = ( EventRecord ) listener.getEventRecords().get( 0 );
        assertEquals( "objectAdded", rec.method );

        // readd the entry once again just to make sure
        ctx.createSubcontext( "ou=testentry", testEntry );
       
        //  Wait 1 second, as the process is asynchronous
        Thread.sleep( 1000 );

        assertEquals( 1, listener.getEventRecords().size() );
View Full Code Here

        Attributes testEntry = LdifUtils.createJndiAttributes(
            "objectClass: top",
            "objectClass: organizationalUnit",
            "ou", "testentry" );

        ctx.createSubcontext( "ou=testentry", testEntry );

        //  Wait 1 second, as the process is asynchronous
        Thread.sleep( 1000 );

        assertEquals( 1, listener.getEventRecords().size() );
View Full Code Here

        assertEquals( 1, listener.getEventRecords().size() );
        rec = ( EventRecord ) listener.getEventRecords().get( 0 );
        assertEquals( "objectAdded", rec.method );

        // readd the entry once again just to make sure
        ctx.createSubcontext( "ou=testentry", testEntry );
       
        //  Wait 1 second, as the process is asynchronous
        Thread.sleep( 1000 );

        assertEquals( 1, listener.getEventRecords().size() );
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.