Simon,

We intend to remove all of JNDI so these capabilities will no longer be available.  You might have guessed that from the [BigBang] discussions.  There will eventually be a JNDI wrapper but it will not be like before.

Thoughts?

Alex

On Jan 4, 2008 5:32 AM, <Simon.Temple@saaconsultants.com> wrote:
Prior to 1.5.2 you could connect to an embedded directory instance using an environment hashtable of String values:
 
ContextFactory:org.apache.directory.server.jndi.ServerContextFactory
ContextProviderURL:
ContextSecurityAuthentication:simple
ContextSecurityCredentials:secret
ContextSecurityPrincipal:uid=admin,ou=system
 
This hashtable could be bound into JNDI and used by other services.
 
As of 1.5.2 we need:
 
ContextFactory:org.apache.directory.server.core.jndi.CoreContextFactory
ContextProviderURL:
ContextSecurityAuthentication:simple
ContextSecurityCredentials:secret
ContextSecurityPrincipal:uid=admin,ou=system
org.apache.directory.server.core.DirectoryService:<DirectoryService Instance>
 
First Point:      We can no longer bind this into JNDI as DefaultDirectoryService is not serializable.
 
Second Point:  We can no longer specify these attributes via a jndi.properties file (see javadoc on InitialContext)
 
If the intention was to allow the selection of a specific instance of an embedded DirectoryService you could use the instanceId... maybe passed via the ContextProviderURL attribute?
 
    ContextProviderURL: java://MyDirectory
 
CoreContextFactory would then have to find the service instance using the given name (or null if instanceId was not given)
 
The requirements of the 1.5.2 CoreContextFactory seems to break the JNDI API usage model and has broken our implementation.
 
Any and all comment appreciated.  :-)
 
- SimonT