directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <>
Subject Re: [JNDI] Getting the Directory Context From a Binding?
Date Mon, 11 Jun 2007 16:48:04 GMT
Well, it's not really clear, but I think that a Binding, in a LDAP
context, is just an Attributes, not a Context.

It's a little bit different than a directory and a file. A LDAP entry
is an entry and can be the father of others entries. This duality does
not exactly applies to other kind of directories...

Alex, thougths ?

On 6/11/07, Ole Ersoy <> wrote:
> 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 );
> 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

Emmanuel L├ęcharny

View raw message