directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Zoerner <ste...@labeo.de>
Subject Re: [JNDI] Creating SubcontextS
Date Mon, 02 Apr 2007 20:05:46 GMT
Ole Ersoy wrote:
> In this case I just need the entry
> "cn=test, cn=test1, cn=test2, ou=system"
> to exist, before attempting to store a DataGraph,
> and I discovered that ApacheDS
> lets me do
> 
> ctx.createSubcontext("cn=whatever");

Hi Ole!

I tried it out. It seems to be a JNDI feature. Your code creates an 
entry like that in ApacheDS 1.5 (and some other directory servers, not 
ApacheDS specific):

dn: cn=whatever,dc=example,dc=com
objectClass: javaContainer
objectClass: top
cn: whatever

The object classes which are missing in the createSubcontext call are 
probably automatically added by the LDAP provider of JNDI, making this a 
perfectly legal entry within the schema, if javaContainer from RFC 2713 
is present in the schema. If, not, your createSubcontext command will 
likely fail (schema violation).

So it is not an error in the schema subsystem, but a funny default 
behavior of JNDI, which I did not know before. Strange API ...

Greetings from Hamburg,
     Stefan



Mime
View raw message