this works for server.xml of version 1.5.2. The config file structures of 1.5.1 and 1.5.2 are not same.

Kiran Ayyagari

John wrote:
I had trouble with this for a while.
You need to edit the server.xml. But the trick is that it's not c:\Program
Files\Apache Directory Server\conf\server.xml, it's c:\Program Files\Apache
Directory Server\instances\default\conf\server.xml.
It's not too hard to work out what to change in that file. I added the
following to the <partitions> section:
      <jdbmPartition id="newExample" cacheSize="100" suffix="dc=acme"
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>#newExampleContextEntry</contextEntry>
      </jdbmPartition>

That is, a cut and paste changing (a) the id from "example" to "newExample",
(b) the suffix to "dc=acme", and (c) the contextEntry to
"#newExampleContextEntry"
Then I added a newExampleContextEntry spring bean down lower. Again, it was
a cut and paste of the exampleContextEntry, changing (a) the id, and (b) the
value to "dc=acme" towards the end.

  <spring:bean id="newExampleContextEntry"

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=acme</spring:value>
      </spring:list>
    </spring:property>
  </spring:bean>

Then restart the directory server. On windows, use the Services control
panel to do this.

Good luck.

John.


On Sat, Jun 21, 2008 at 7:00 AM, Kiran Ayyagari <[EMAIL PROTECTED]>
wrote:

hi Lego,

  Which version of ADS you are using?

Kiran Ayyagari


Leo Galambos wrote:

Hello,

I am trying to add a new partition. I follow the documentation at
http://directory.apache.org/apacheds/1.5/144-adding-your-own-partition-resp-suffix.html
suggesting to find <property name="contextPartitionConfigurations"> and
add <bean id="examplePartitionConfiguration"...

Unfortunately, my server.conf does not include such tags, only
<defaultDirectoryService... or <systemPartition... etc.

I do think that the documentation of 1.5 is obsolete (does it describe ADS
1.0 format?).

I found XSD document with some hints, but it is still hard to understand
all the bells and whistles (you know, I try ADS for the first time). Can you
point me to a right documentation or send a server.conf with a new added
partition, let's say "dc=ACME", please?

Thank you very much,
LG



Reply via email to