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: [jira] Updated: (DIRSERVER-964) Binding does not return DirContext Object's when creating by doing ctx.createSubcontext("cn=test");
Date Mon, 11 Jun 2007 10:17:26 GMT


Emmanuel Lecharny wrote:
> Ole Ersoy a écrit :
> 
>> Yes - Cause you are cheating :-)  I'm able to create a context without 
>> specifying the attributes.  Alex or Stefan pointed out earlier that 
>> the reason I can do this is because the server now supports some RFC 
>> that says it's ok to do this.   
> 
> Can you pointing me to those RFCs ?

Alex said it's RFC 2713
http://mail-archives.apache.org/mod_mbox/directory-dev/200704.mbox/%3Ca32f6b020704031322g2dc0cc69w1a3551997d9856b8@mail.gmail.com%3E

> 
>> Also, the tests are not supposed to pass.  When they start failing 
>> then maybe it is fixed.  This is if my assumptions with respect to how 
>> this is supposed to work are right though.
>>
>> You added the person ObjectClass so that the contexts are created.  
>> Now the tests pass.  But you should be able to run the test just as 
>> is.  What I'm wondering is "Should the test be green?".
> 
> I get it red, not green without my additions.
> 
>>
>> It seems to me that assertNull( binding.getObject() ); should not 
>> pass.  The reason for this is that I can lookup the context and when I 
>> do it is an instance of a DirContext.  
> 
> My understanding is that you are doing a getObject() on a binding 
> requestion for a null value (""), so you get nothing back. Now, the 
> semantic of this call is not clear to me.

Well, a while back Stefan gave me this code for getting and iterating through all child contexts
of a specific context:

NamingEnumeration enm = ctx.listBindings("");
while (enm.hasMore()) {
  Binding b = (Binding) enm.next();
  if (b.getObject() instanceof Context) {
    Context child = (Context) b.getObject();
  }
}

It's worked before.  In this instance L0 could have multiple subcontexts like L1A, L1B, L1C,
etc.  I'd like to get those DirContext instances, so I can grab the cn attribute.


SNIP

Mime
View raw message