directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon.Tem...@saaconsultants.com
Subject DS 1.5.2, JNDI & CoreContextFactory
Date Fri, 04 Jan 2008 10:32:05 GMT
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
Mime
View raw message