directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject Re: [JNDI] Navigating the DIT
Date Wed, 11 Apr 2007 18:11:48 GMT
Hey Stefan!

Aha - That helps a great deal!

Cool - I should be well on my way now.

Thanks again,
- Ole


Stefan Zoerner wrote:
> Ole Ersoy wrote:
>>
>> Something like
>> ctx.getChildren()...which would delegate to how jndi does this...
>> ctx.getChild(name)....
> 
> Hi Ole!
> 
> For looking up children I would recommend to use the list or 
> listBindings methods. If you need the children of ctx, you can simply 
> call ctx.listBindings(""), something like this (no compilation done)
> 
> NamingEnumeration enm = ctx.listBindings("");
> while (enm.hasMore()) {
>   Binding b = (Binding) enm.next();
>   if (b.getObject() instanceof Context) {
>     Context child = (Context) b.getObject();
>   }
> }
> 
> Greetings from Hamburg,
>     Stefan
> 
> 
> 

Mime
View raw message