Package com.sun.jndi.ldap

Examples of com.sun.jndi.ldap.LdapCtx.lookup()


            } else {
                Assert.assertNotSame(ldapContext1, ldapContext2);
            }
            LOGGER.info("acquired external LDAP context: " + ldapContext1.toString());
            LdapCtx c = (LdapCtx)ldapContext1.lookup("dc=jboss,dc=org");
            c = (LdapCtx)c.lookup("ou=People");
            Attributes attributes = c.getAttributes("uid=jduke");
            Assert.assertTrue(attributes.get("description").contains("awesome"));
            // resource injection
            LookupEjb ejb = (LookupEjb) ctx.lookup("java:module/LookupEjb");
            Assert.assertNotNull(ejb);
View Full Code Here


            // resource injection
            LookupEjb ejb = (LookupEjb) ctx.lookup("java:module/LookupEjb");
            Assert.assertNotNull(ejb);
            c = ejb.getLdapCtx();
            Assert.assertNotNull(c);
            c = (LdapCtx)c.lookup("ou=People");
            attributes = c.getAttributes("uid=jduke");
            Assert.assertTrue(attributes.get("description").contains("awesome"));
        } finally {
            if (ctx != null) {
                ctx.close();
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.