The Carbon Java Framework  

The Carbon JNDI-based Config Module

Config-JNDI Service Design

Author: Douglas Voet (dvoet at sapient.com)
Version: $Revision: 1.3 $($Author: araman $ / $Date: 2003/05/05 07:42:45 $)
Created: March 2003

Overview

The Config-JNDI Service provides implementations for the interfaces in the org.sape.carbon.core.config.node package. These interfaces are:

  • Node
  • Folder
  • ConfigurationDocument
  • NodeFactory
Node, Folder, and ConfigurationDocument implementations extend from the abstract classes defined in the node package. An implementation of NodeFactory exists for folders, links, and confinguration documents.

The abstract classes in org.sape.carbon.core.config.node provide the mechanics of how nodes work and interact with each other. The classes in this module deal with how nodes are represented in the backing directory.

JNDI Structure

This section discusses how Nodes are stored in a JNDI directory. There are two different namespaces used here. The first is the terminology used within this service. The second is the directory attribute naming convention. This document denotes the former with bold and the latter are underlined.

Node Names

All nodes must have a name. The JNDI attribute that stores node name is called NodeName. By default, the name of the NodeName attribute is "name".

Node Types

There are two main typs of nodes, Folder and ConfigurationDocument. The JNDI attribute that stores what type of node a context represents is called NodeType. By default, the attribute that stores NodeType is objectClass. By default, a Folder is defined by an objectClass of configFolder and a ConfigurationDocument is defined by an objectClass of configDoc.

Document Types

There are two types of ConfigurationDocuments that contain content, documents and links. The JNDI attribute that stores what type of document a context represents is called DocumentType. By default, the attribute that stores DocumentType is type. By default, a document is defined by type doc and a link is defined by type link.

Node Content

Contexts that represent Folders do not contain content, but they can contain subcontexts.

Contexts that represent ConfigurationDocuments cannot contain subcontexts, but can contain content. Content is stored as XML in a JNDI attribute. The JNDI attribute that stores a document's content is called Content. By default, the attribute that stores Content is content.

LDAP Schema

This service was implemented with an LDAP directory as the backing data store. The following schema was used during development.

attributeType ( 1.3.6.1.4.1.4203.666.1.100 NAME 'content'
                EQUALITY caseIgnoreMatch
                SUBSTR caseIgnoreSubstringsMatch
                SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

attributeType ( 1.3.6.1.4.1.4203.666.1.101 NAME 'type'
                EQUALITY caseIgnoreMatch
                SUBSTR caseIgnoreSubstringsMatch
                SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{4} )


# Object Class Definitions
objectclass ( 1.3.6.1.4.1.4203.666.1.110 NAME 'configFolder' SUP top AUXILIARY
        DESC 'Configuration folder used to contain configDocuments or other configFolders'
        MUST ( name ) )

objectclass ( 1.3.6.1.4.1.4203.666.1.111 NAME 'configDocument' SUP top AUXILIARY
        DESC 'Document containing configuration information'
        MUST ( name $ type $ content ) )
                

Copyright © 2001-2003, Sapient Corporation