Hi Markus,

You should have a commented out configuration block for the replication module 
in your default server.xml.  If you can't find it have a look at 
http://svn.apache.org/viewvc/directory/apacheds/releases/1.5.0/server-main/server.xml?view=markup
 and search for "replication".  Just uncomment that block and change the port 
numbers / addresses as appropriate.

As an example, for server 1 (running on 10.0.0.1) use:

        <bean 
class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
          <property name="name" value="replicationService" />
          <property name="interceptor">
            <bean 
class="org.apache.directory.mitosis.service.ReplicationService">
              <property name="configuration">
                <bean 
class="org.apache.directory.mitosis.configuration.ReplicationConfiguration">
                  <property name="replicaId">
                    <bean class="org.apache.directory.mitosis.common.ReplicaId">
                      <constructor-arg>
                        <value>instance_a</value>
                      </constructor-arg>
                    </bean>
                  </property>
                  <property name="serverPort" value="10390" />
                  <property name="peerReplicas">
                    <set>
                      <value>[EMAIL PROTECTED]:10390</value>
                    </set>
                  </property>
                </bean>
              </property>
            </bean>
          </property>
        </bean>

and for server 2 (running on 10.0.0.2) use:

        <bean 
class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
          <property name="name" value="replicationService" />
          <property name="interceptor">
            <bean 
class="org.apache.directory.mitosis.service.ReplicationService">
              <property name="configuration">
                <bean 
class="org.apache.directory.mitosis.configuration.ReplicationConfiguration">
                  <property name="replicaId">
                    <bean class="org.apache.directory.mitosis.common.ReplicaId">
                      <constructor-arg>
                        <value>instance_b</value>
                      </constructor-arg>
                    </bean>
                  </property>
                  <property name="serverPort" value="10390" />
                  <property name="peerReplicas">
                    <set>
                      <value>[EMAIL PROTECTED]:10390</value>
                    </set>
                  </property>
                </bean>
              </property>
            </bean>
          </property>
        </bean>

I personally wouldn't recommend using this feature for production servers 
though as it has a few problems.  Check out the bugs on JIRA and test it 
thoroughly for your use cases.  I ended up making my own copy of the mitosis 
source and hacking it around a bit to get it performing the way I needed it.

Hope this helps,

Martin




>>> Markus Pohle <[EMAIL PROTECTED]> 01/06/2007 21:00 >>>

Hi Alex,

thats correct... build-in replication support thru mitosis is in  
apacheds version 1.5 only.

but still have the problem that I do not understand how to configure  
the replication with two master ldap servers as described in my first  
email.

did anybody from the core team configure the replication and tested  
it? maybe someone can send me sample configuration file that I can use?

any help is really appreciated!!

TIA,
Markus Pohle



Reply via email to