directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Yesberg" <john.yesb...@gmail.com>
Subject Re: Adding a new dit/partition in ApacheDS 1.5.2
Date Mon, 02 Jun 2008 12:12:03 GMT
The trick that I found was that you couldn't edit the
<install>/conf/server.xml file (as mentioned in the docs).
You need to edit <install>/instances/default/conf/server.xml

Also, the docs suggest that you'll find each instance specified like this:

<bean id="examplePartitionConfiguration"
      class="org.apache.directory.server.core.partition.
                            impl.btree.MutableBTreePartitionConfiguration">
    <property name="name" value="example" />
    <property name="cacheSize" value="100"/>
    <property name="suffix" value="dc=example,dc=com" />
    <property name="optimizerEnabled" value="true" />
    <property name="synchOnWrite" value="true" />
    <property name="indexedAttributes">
      <set>
        <bean class="org.apache.directory.server.core.partition.
                                    impl.btree.MutableIndexConfiguration">
          <property name="attributeId" value="dc" />
          <property name="cacheSize" value="100" />
        </bean>
        ...
        <bean class="org.apache.directory.server.core.partition.
                                    impl.btree.MutableIndexConfiguration">
          <property name="attributeId" value="objectClass" />
          <property name="cacheSize" value="100" />
        </bean>
      </set>
    </property>
    <property name="contextEntry">
      <value>
        objectClass: top
        objectClass: domain
        objectClass: extensibleObject
        dc: example
      </value>
    </property>
</bean>

I found that it was actually

      <jdbmPartition id="example" cacheSize="100"
suffix="dc=example,dc=com" optimizerEnabled="true"
                     syncOnWrite="true">
        <indexedAttributes>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" cacheSize="10"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" cacheSize="10"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" cacheSize="10"/>
          <jdbmIndex attributeId="dc" cacheSize="100"/>
          <jdbmIndex attributeId="ou" cacheSize="100"/>
          <jdbmIndex attributeId="krb5PrincipalName" cacheSize="100"/>
          <jdbmIndex attributeId="uid" cacheSize="100"/>
          <jdbmIndex attributeId="objectClass" cacheSize="100"/>
        </indexedAttributes>
        <contextEntry>#exampleContextEntry</contextEntry>
        <!-- contextEntry>
          <s:value>
            objectClass: top
            objectClass: domain
            objectClass: extensibleObject
            dc: example
          </s:value>
        </contextEntry -->
      </jdbmPartition>

The key things to change are:
1. The suffix (in the first line)
2. The contextEntry. It currently points to another part of the
server.xml file (ie. exampleContextEntry); find it, copy it, rename it
(ie. id="newName"), & modify as necessary, and then change the pointer
to point to the new name (ie. <contextEntry>#newName</contextEntry>).

  <spring:bean id="exampleContextEntry"
	class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
    <spring:property name="targetObject"><spring:ref
local='directoryService'/></spring:property>
    <spring:property
name="targetMethod"><spring:value>newEntry</spring:value></spring:property>
    <spring:property name="arguments">
      <spring:list>
        <spring:value xmlns="http://www.springframework.org/schema/beans">
          objectClass: top
          objectClass: domain
          objectClass: extensibleObject
          dc: example
        </spring:value>
        <spring:value>dc=example,dc=com</spring:value>
      </spring:list>
    </spring:property>
  </spring:bean>

Hope it helps,

John.

> Check out the doco - it's not that far off - you should be able to piece it
> together by looking at how it's done with the example schema.
>
> Alex
>
> On Thu, May 8, 2008 at 6:54 AM, Pierre Smits <pierre.smits@gmail.com> wrote:
>
> > How do I add a new dit/partition in release 1.5.2?
> >
> > Regards,
> >
> > Pierre
> >

Mime
View raw message