Introduction

The server is using JNDI internally for manipulating data. It makes sense as a layer on top of the server, if someone want to use it embedded, but the JNDI API is not exactly the best fit for LDAP operations.

The idea is to simply redifine the JNDI structure to use what we really need, and nothing else.

JNDI API usage in ADS

This table list the JNDI classes and interface, exposing those which are used and those we are not.

Classes and interfaces 

I/C

JNDI class

Used

I/C

ADS class

Comment

I

Attribute

(tick)

I

ServerAttribute

Not used yet

I

Attributes

(tick)

I

ServerEntry

Not used yet

C

BasicAttribute

(tick)

C

ServerAttributeImpl

Not used yet

C

BasicAttributes

(tick)

C

ServerEntryImpl

Not used yet

C

BinaryRefAddr

(error)

 

 

 

C

Binding

(tick)

 

 

 

C

CompositeName

(tick)

 

 

Used only in one test

C

CompoundName

(tick)

C

LdapDN

We should use LdapDN everywhere inside the server

I

Context

(tick)

I

ServerContext  (question)

It's all over the code. Do we have to define our own interface ?

I

Control

(tick)

I

MutableControl (Should be ServerControl)

We also have a Control class in codec which should be renamed
to something like MsgControl

C

ControlFactory

(error)

 

 

 

I

DirContext

(tick)

 

 

 

C

DirectoryManager

(tick)

 

 

Used in apacheds-core

I

DirObjectFactory

(tick)

 

 

 

I

DirStateFactory

(tick)

 

 

Used in tests and in kerberos

C

DirStateFactory.Result

(tick)

 

 

Used in core and kerberos

I

EventContext

(tick)

 

 

 

I

EventDirContext

(tick)

 

 

 

I

ExtendedRequest

(tick)

 

 

 

I

ExtendedResponse

(tick)

 

 

 

I

HasControls

(tick)

 

 

Used in ChangeListener and PersistentSearchTest in server-unit

C

InitialContext

(tick)

 

 

 

I

InitialContextFactory

(tick)

 

 

 

I

InitialContextFactoryBuilder

(error)

 

 

 

C

InitialDirContext

(tick)

 

 

 

C

InitialLdapContext

(tick)

 

 

 

I

LdapContext

(tick)

 

 

 

C

LinkRef

(error)

 

 

 

C

ModificationItem

(tick)

C

ServerModification

Not Implemented Yest

I

Name

(tick)

I

ServerName

We don't have an interface yet

C

NameClassPair

(tick)

 

 

Used in core-unit and in the JNDI layer

I

NameParser

(tick)

C

LdapDNParser

An implementation

I

NamespaceChangeListener

(tick)

 

 

 

I

NamingEnumeration

(tick)

I

ServerIterator

To be defined

C

NamingEvent

(tick)

 

 

 

C

NamingExceptionEvent

(tick)

 

 

 

I

NamingListener

(tick)

 

 

 

C

NamingManager

(error)

 

 

 

I

ObjectChangeListener

(tick)

 

 

 

I

ObjectFactory

(error)

 

 

 

I

ObjectFactoryBuilder

(error)

 

 

 

C

RefAddr

(error)

 

 

 

C

Reference

(tick)

 

ServerReference

 

I

Referenceable

(tick)

 

 

 

I

Resolver

(error)

 

 

 

C

ResolveResult

(error)

 

 

 

C

SearchControls

(tick)

 

ServerSearchControls

 

C

SearchResult

(tick)

 

ServerSearchResult

 

I

StateFactory

(error)

 

 

 

C

StringRefAddr

(error)

 

 

 

I

UnsolicitedNotification

(tick)

 

 

Only used in DisconnectNotificationCommandExecutor

C

UnsolicitedNotificationEvent

(tick)


 

Only used in DisconnectNotificationCommandExecutor

I

UnsolicitedNotificationListener

(tick)

 

 

Implemented by DisconnectNotificationCommandExecutor

Exceptions

JNDI

used

ADS

AttributeInUseException

(tick)

LdapAttributeInUseException

AttributeModificationException

never returned

 

AuthenticationException

(tick)

LdapAuthenticationException

AuthenticationNotSupportedException

(tick)

LdapAuthenticationNotSupportedException

CannotProceedException

(error)

 

CommunicationException

(tick)

 

ConfigurationException

(tick)

LdapConfigurationException

ContextNotEmptyException

(tick)

LdapContextNotEmptyException

InsufficientResourcesException

(error)

 

InterruptedNamingException

(error)

 

InvalidAttributeIdentifierException

(tick)

LdapInvalidAttributeIdentifierException

InvalidAttributesException

(error)

 

InvalidAttributeValueException

(tick)

LdapInvalidAttributeValueException

InvalidNameException

(tick)

LdapInvalidNameException

InvalidSearchControlsException

(error)

 

InvalidSearchFilterException

(tick)

 

LdapReferralException

(tick)

LdapReferralException

LimitExceededException

(tick)

 

LinkException

(error)

 

LinkLoopException

(error)

 

MalformedLinkException

(error)

 

NameAlreadyBoundException

(tick)

LdapNameAlreadyBoundException

NameNotFoundException

(tick)

LdapNameNotFoundException

NamingException

(tick)

LdapNamingException

NamingSecurityException

(error)

 

NoInitialContextException

(error)

 

NoPermissionException

(tick)

LdapNoPermissionException

NoSuchAttributeException

(tick)

LdapNoSuchAttributeException

NotContextException

(error)

 

OperationNotSupportedException

(tick)

LdapOperationNotSupportedException

PartialResultException

(tick)

 

ReferralException

(tick)

LdapReferralException

SchemaViolationException

(tick)

LdapSchemaViolationException

ServiceUnavailableException

(tick)

LdapServiceUnavailableException

SizeLimitExceededException

(tick)

LdapSizeLimitExceededException

TimeLimitExceededException

(tick)

LdapTimeLimitExceededException

Define a JNDI Wrapper

We want to keep a wrapper around the server for users who want to embed the server. All the JNDI layer is buried into apacheds-core, in the org.apache.directory.server.core.jndi package.

We should just create a new project, which will cover this layer exclusively.

  • No labels