directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject [JNDI] Getting the Directory Context From a Binding?
Date Mon, 11 Jun 2007 16:40:10 GMT
Hey Guys,

I'm trying to obtain a context from a binding.  I first create a L0 context, and then an L1
context that's a sub context of the L0 context.  I'm wondering whether the asserts below should
pass (They do pass)?

NamingEnumeration<Binding> childEntryContexts = directoryContextL0.listBindings("");
assertTrue( childEntryContexts.hasMore() );
Binding binding = ( Binding ) childEntryContexts.next();
assertEquals( "cn=L1,cn=L0,ou=test", binding.getName() );
assertNull( binding.getObject() );

JGuru says this:

listBindings() attempts to return an enumeration of the Binding's of all of the objects in
the current context. I.e., it's a listing of all of the objects in the current context with
the object's name, its class name, and a reference to the object itself.


It seems like the reference to the L1 object (Context) is missing in this case, although we
can see that it's there because binding returns its name.  Thoughts?

Thanks,
- Ole



Mime
View raw message