You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2008/10/29 18:45:56 UTC

svn commit: r708950 [1/2] - in /geronimo/plugins/directory/branches/1.0: ./ directory/ directory/src/main/plan/ directory/src/main/resources/META-INF/ geronimo-directory-server/ geronimo-directory/ geronimo-directory/src/main/java/org/apache/geronimo/d...

Author: djencks
Date: Wed Oct 29 10:45:56 2008
New Revision: 708950

URL: http://svn.apache.org/viewvc?rev=708950&view=rev
Log:
Upgrade to apacheds 1.5.4

Modified:
    geronimo/plugins/directory/branches/1.0/directory/pom.xml
    geronimo/plugins/directory/branches/1.0/directory/src/main/plan/plan.xml
    geronimo/plugins/directory/branches/1.0/directory/src/main/resources/META-INF/server.xml
    geronimo/plugins/directory/branches/1.0/geronimo-directory-server/pom.xml
    geronimo/plugins/directory/branches/1.0/geronimo-directory/pom.xml
    geronimo/plugins/directory/branches/1.0/geronimo-directory/src/main/java/org/apache/geronimo/directory/DirectoryGBean.java
    geronimo/plugins/directory/branches/1.0/geronimo-directory/src/test/java/org/apache/geronimo/directory/RunningTest.java
    geronimo/plugins/directory/branches/1.0/geronimo-directory/src/test/resources/server.xml
    geronimo/plugins/directory/branches/1.0/pom.xml

Modified: geronimo/plugins/directory/branches/1.0/directory/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/branches/1.0/directory/pom.xml?rev=708950&r1=708949&r2=708950&view=diff
==============================================================================
--- geronimo/plugins/directory/branches/1.0/directory/pom.xml (original)
+++ geronimo/plugins/directory/branches/1.0/directory/pom.xml Wed Oct 29 10:45:56 2008
@@ -21,16 +21,15 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
-    
+
     <parent>
         <groupId>org.apache.geronimo.plugins</groupId>
         <artifactId>directory-parent</artifactId>
         <version>1.0.1-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>directory</artifactId>
-    <name>Apache Geronimo-Apache Directory Server Plugin</name>
+    <name>Geronimo Apache Directory Server Plugin</name>
     <packaging>car</packaging>
     <description>
         This plugin integrates the Apache Directory Server (ApacheDS)
@@ -45,195 +44,282 @@
     </description>
 
     <dependencies>
-        
         <dependency>
-            <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>j2ee-server</artifactId>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-gbean-deployer</artifactId>
             <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <!-- g 2.1.x does not use slf4j -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-jcl</artifactId>
         </dependency>
 
+<!-- remaining dependencies are copied from trunk history/dependencies.xml with a few obvious ommissions -->
         <dependency>
-            <groupId>org.apache.geronimo.plugins</groupId>
-            <artifactId>geronimo-directory</artifactId>
-            <version>1.0.1-SNAPSHOT</version>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
+            <type>jar</type>
         </dependency>
-        
+        <!--<dependency>-->
+            <!--<groupId>aopalliance</groupId>-->
+            <!--<artifactId>aopalliance</artifactId>-->
+            <!--<type>jar</type>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+            <!--<groupId>opensymphony</groupId>-->
+            <!--<artifactId>quartz</artifactId>-->
+            <!--<type>jar</type>-->
+        <!--</dependency>-->
         <dependency>
-            <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-server-jndi</artifactId>
+            <groupId>org.apache.directory.shared</groupId>
+            <artifactId>shared-asn1-codec</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
-            <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-bootstrap-extract</artifactId>
+            <groupId>commons-daemon</groupId>
+            <artifactId>commons-daemon</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-bootstrap-partition</artifactId>
+            <artifactId>apacheds-jdbm-store</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-btree-base</artifactId>
+            <artifactId>apacheds-schema-registries</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-core</artifactId>
+            <artifactId>apacheds-core-entry</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
-            <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-core-shared</artifactId>
+            <groupId>org.apache.directory.shared</groupId>
+            <artifactId>shared-ldap-constants</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-jdbm-store</artifactId>
+            <artifactId>apacheds-utils</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-schema-bootstrap</artifactId>
+            <artifactId>apacheds-xdbm-tools</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-schema-registries</artifactId>
+            <artifactId>apacheds-xbean-spring</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-utils</artifactId>
+            <artifactId>apacheds-server-jndi</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-kerberos-shared</artifactId>
+            <artifactId>apacheds-protocol-shared</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>j2ee-server</artifactId>
+            <type>car</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xbean</groupId>
+            <artifactId>xbean-spring</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-protocol-changepw</artifactId>
+            <artifactId>apacheds-xdbm-search</artifactId>
+            <type>jar</type>
         </dependency>
-        <!--<dependency>-->
-        <!--<groupId>org.apache.directory.server</groupId>-->
-        <!--<artifactId>apacheds-protocol-dhcp</artifactId>-->
-        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-protocol-dns</artifactId>
+            <artifactId>apacheds-core-constants</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.directory.shared</groupId>
+            <artifactId>shared-bouncycastle-reduced</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-protocol-kerberos</artifactId>
+            <artifactId>apacheds-bootstrap-partition</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-io</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>antlr</groupId>
+            <artifactId>antlr</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-protocol-ldap</artifactId>
+            <artifactId>apacheds-core</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-protocol-ntp</artifactId>
+            <artifactId>apacheds-protocol-ldap</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
             <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-protocol-shared</artifactId>
+            <artifactId>apacheds-core-shared</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
-            <groupId>org.apache.directory.daemon</groupId>
-            <artifactId>daemon-bootstrappers</artifactId>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-core-avl</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
-            <groupId>org.apache.directory.shared</groupId>
-            <artifactId>shared-ldap</artifactId>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-filter-ssl</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
-          <groupId>org.apache.directory.shared</groupId>
-          <artifactId>shared-ldap-constants</artifactId>
+            <groupId>jug</groupId>
+            <artifactId>jug-asl</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
-            <groupId>org.apache.directory.shared</groupId>
-            <artifactId>shared-asn1</artifactId>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>mitosis</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
-            <groupId>org.apache.directory.shared</groupId>
-            <artifactId>shared-asn1-codec</artifactId>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-schema-extras</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
-            <groupId>org.apache.mina</groupId>
-            <artifactId>mina-core</artifactId>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-protocol-ntp</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
-            <groupId>org.apache.mina</groupId>
-            <artifactId>mina-filter-ssl</artifactId>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-xdbm-base</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-core-jndi</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring</artifactId>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-schema-bootstrap</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-kerberos-shared</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
             <groupId>org.springframework</groupId>
-            <artifactId>spring-beans</artifactId>
+            <artifactId>spring</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-jdbm</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
-            <groupId>org.apache.xbean</groupId>
-            <artifactId>xbean-spring</artifactId>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
-            <groupId>backport-util-concurrent</groupId>
-            <artifactId>backport-util-concurrent</artifactId>
+            <groupId>org.apache.directory.shared</groupId>
+            <artifactId>shared-asn1</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
-          <groupId>commons-collections</groupId>
-          <artifactId>commons-collections</artifactId>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-bootstrap-extract</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
-          <groupId>commons-lang</groupId>
-          <artifactId>commons-lang</artifactId>
+            <groupId>org.apache.directory.daemon</groupId>
+            <artifactId>daemon-bootstrappers</artifactId>
+            <type>jar</type>
         </dependency>
         <dependency>
-          <groupId>antlr</groupId>
-          <artifactId>antlr</artifactId>
+            <groupId>org.apache.geronimo.plugins</groupId>
+            <artifactId>geronimo-directory</artifactId>
+            <type>jar</type>
+            <version>${version}</version>
         </dependency>
         <dependency>
-          <groupId>jdbm</groupId>
-          <artifactId>jdbm</artifactId>
+            <groupId>org.apache.directory.shared</groupId>
+            <artifactId>shared-ldap</artifactId>
+            <type>jar</type>
         </dependency>
-
         <dependency>
-            <groupId>org.apache.geronimo.framework</groupId>
-            <artifactId>geronimo-gbean-deployer</artifactId>
-            <type>car</type>
-            <scope>provided</scope>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-core-cursor</artifactId>
+            <type>jar</type>
         </dependency>
+        <!--<dependency>-->
+            <!--<groupId>commons-pool</groupId>-->
+            <!--<artifactId>commons-pool</artifactId>-->
+            <!--<type>jar</type>-->
+        <!--</dependency>-->
 
     </dependencies>
-    
+
     <build>
 
         <plugins>
             <plugin>
                 <groupId>org.apache.geronimo.buildsupport</groupId>
                 <artifactId>car-maven-plugin</artifactId>
+
+                <!-- Install as extention to allow 'car' packaging to be used. -->
+                <extensions>true</extensions>
+
                 <configuration>
                     <archive>
                         <!-- Do not include META-INF/maven to avoid long file problems on windows -->
@@ -250,26 +336,17 @@
                     <instance>
                         <plugin-artifact>
                             <copy-file relative-to="server" dest-dir="var/directory">META-INF/server.xml</copy-file>
-                            <copy-file relative-to="server" dest-dir="var/directory">META-INF/log4j.properties</copy-file>
                             <config-xml-content>
                                <gbean name="DirectoryService">
                                     <attribute name="configFile">var/directory/server.xml</attribute>
                                     <attribute name="workingDir">var/directory</attribute>
-                                    <attribute name="providerURL">${providerURL}</attribute>
                                 </gbean>
                             </config-xml-content>
-                            <config-substitution key="providerURL">ou=system</config-substitution>
                         </plugin-artifact>
                     </instance>
                 </configuration>
             </plugin>
         </plugins>
-        <resources>
-            <resource>
-                <directory>${pom.basedir}/src/main/resources</directory>
-                <filtering>true</filtering>
-            </resource>
-        </resources>
     </build>
-        
+
 </project>

Modified: geronimo/plugins/directory/branches/1.0/directory/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/branches/1.0/directory/src/main/plan/plan.xml?rev=708950&r1=708949&r2=708950&view=diff
==============================================================================
--- geronimo/plugins/directory/branches/1.0/directory/src/main/plan/plan.xml (original)
+++ geronimo/plugins/directory/branches/1.0/directory/src/main/plan/plan.xml Wed Oct 29 10:45:56 2008
@@ -23,12 +23,6 @@
     <gbean name="DirectoryService" class="org.apache.geronimo.directory.DirectoryGBean">
         <attribute name="configFile">var/directory/server.xml</attribute>
         <attribute name="workingDir">var/directory</attribute>
-        <attribute name="providerURL">ou=system</attribute>
-        <reference name="ServerInfo"><name>ServerInfo</name></reference>
-    </gbean>
-
-    <gbean name="DirectoryLog4jConfiguration" class="org.apache.geronimo.system.logging.log4j.ApplicationLog4jConfigurationGBean">
-        <attribute name="log4jFile">var/directory/log4j.properties</attribute>
         <reference name="ServerInfo"><name>ServerInfo</name></reference>
     </gbean>
 

Modified: geronimo/plugins/directory/branches/1.0/directory/src/main/resources/META-INF/server.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/branches/1.0/directory/src/main/resources/META-INF/server.xml?rev=708950&r1=708949&r2=708950&view=diff
==============================================================================
--- geronimo/plugins/directory/branches/1.0/directory/src/main/resources/META-INF/server.xml (original)
+++ geronimo/plugins/directory/branches/1.0/directory/src/main/resources/META-INF/server.xml Wed Oct 29 10:45:56 2008
@@ -1,479 +1,211 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
 -->
-<!-- $Rev$ $Date$ -->
 
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
-  "http://www.springframework.org/dtd/spring-beans.dtd">
 
-<beans>
-  <bean id="environment" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
-    <property name="properties">
-      <props>
-        <!-- JNDI security properties used to get initial contexts.         -->
-        <prop key="java.naming.security.authentication">simple</prop>
-        <prop key="java.naming.security.principal">uid=admin,ou=system</prop>
-        <prop key="java.naming.security.credentials">secret</prop>
-        <!-- Set this key to a space delimited set of attributeType descriptions
-             and their OID's if you want an attributeType to be handled as
-             binary content.
-
-             The server will use the schema to derive the set of attributeTypes
-             to treat as binary.  The union if the values you provide here
-             will be taken as the set of binaries. Note to be consistent you
-             must add both the OID and all the names an attributeType can have.
-        -->
-        <!--
-        <prop key="java.naming.ldap.attributes.binary"></prop>
-        -->
-      </props>
-    </property>
-  </bean>
-
-  <bean id="changePasswordConfiguration" class="org.apache.directory.server.changepw.ChangePasswordConfiguration">
-    <!-- Whether to enable the Change Password protocol.                    -->
-    <property name="enabled" value="false" />
-    <!-- The port to run the Change Password protocol on.                   -->
-    <property name="ipPort" value="464" />
-  </bean>
-
-  <bean id="ntpConfiguration" class="org.apache.directory.server.ntp.NtpConfiguration">
-    <!-- Whether to enable the NTP protocol.                                -->
-    <property name="enabled" value="false" />
-    <!-- The port to run the NTP protocol on.                               -->
-    <property name="ipPort" value="123" />
-  </bean>
-
-  <bean id="dnsConfiguration" class="org.apache.directory.server.dns.DnsConfiguration">
-    <!-- Whether to enable the DNS protocol.                                -->
-    <property name="enabled" value="false" />
-    <!-- The port to run the DNS protocol on.                               -->
-    <property name="ipPort" value="53" />
-  </bean>
-
-  <bean id="kdcConfiguration" class="org.apache.directory.server.kerberos.kdc.KdcConfiguration">
-    <!-- Whether to enable the Kerberos protocol.                           -->
-    <property name="enabled" value="false" />
-    <!-- The port to run the Kerberos protocol on.                          -->
-    <property name="ipPort" value="88" />
-  </bean>
-
-  <bean id="ldapsConfiguration" class="org.apache.directory.server.ldap.LdapConfiguration">
-    <!-- Whether to enable the LDAPS protocol.                               -->
-    <property name="enabled" value="false" />
-    <!-- The port to run the LDAPS protocol on.                              -->
-    <property name="ipPort" value="636" />
-
-    <property name="enableLdaps" value="true" />
-  </bean>
-
-  <bean id="ldapConfiguration" class="org.apache.directory.server.ldap.LdapConfiguration">
-    <!-- The port to run the LDAP protocol on.                              -->
-    <property name="ipPort" value="10389" />
-    <!-- Whether to allow anonymous access.                                 -->
-    <property name="allowAnonymousAccess" value="false" />
+<spring:beans xmlns:spring="http://xbean.apache.org/schemas/spring/1.0" 
+			  xmlns:s="http://www.springframework.org/schema/beans"
+			  xmlns="http://apacheds.org/config/1.0">
+
+  <defaultDirectoryService id="directoryService" instanceId="default"
+                           workingDirectory="example.com"
+                           allowAnonymousAccess="true"
+                           accessControlEnabled="false"
+                           denormalizeOpAttrsEnabled="false">
+    <systemPartition>
+      <!-- use the following partitionConfiguration to override defaults for -->
+      <!-- the system partition                                              -->
+      <jdbmPartition id="system" cacheSize="100" suffix="ou=system" 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="ou" cacheSize="100"/>
+          <jdbmIndex attributeId="uid" cacheSize="100"/>
+          <jdbmIndex attributeId="objectClass" cacheSize="100"/>
+        </indexedAttributes>
+      </jdbmPartition>
+    </systemPartition>
+
+    <partitions>
+      <!-- NOTE: when specifying new partitions you need not include those   -->
+      <!-- attributes below with OID's which are the system indices, if left -->
+      <!-- out they will be automatically configured for you with defaults.  -->
+      <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>
+      </jdbmPartition>
+    </partitions>
+
+    <interceptors>
+      <normalizationInterceptor/>
+      <authenticationInterceptor/>
+      <aciAuthorizationInterceptor/>
+      <defaultAuthorizationInterceptor/>
+      <exceptionInterceptor/>
+      <operationalAttributeInterceptor/>
+
+      <!-- Uncomment to enable the password policy interceptor
+      <passwordPolicyInterceptor/>
+      <keyDerivationInterceptor/>
+      -->
+
+      <schemaInterceptor/>
+      <subentryInterceptor/>
+      <collectiveAttributeInterceptor/>
+      <eventInterceptor/>
+      <triggerInterceptor/>
+
+      <!-- Uncomment to enable replication interceptor
+      <replicationInterceptor>
+        <configuration>
+          <replicationConfiguration serverPort="10390" peerReplicas="instance_b@localhost:10392">
+            <replicaId>
+              <replicaId id="instance_a"/>
+            </replicaId>
+          </replicationConfiguration>
+        </configuration>
+      </replicationInterceptor>
+      -->
+    </interceptors>
+  </defaultDirectoryService>
+
+  <standardThreadPool id="standardThreadPool" maxThreads="8"/>
+  <datagramAcceptor id="datagramAcceptor" logicExecutor="#standardThreadPool"/>
+  <socketAcceptor id="socketAcceptor" logicExecutor="#standardThreadPool"/>
+
+<!--  missing  atou=users,dc=example,dc=com
+  <changePasswordServer ipPort="60464">
+    <directoryService>#directoryService</directoryService>
+    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
+  </changePasswordServer>
+-->
+<!--  missing atou=users,dc=example,dc=com
+  <kdcServer ipPort="60088">
+    <directoryService>#directoryService</directoryService>
+    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
+  </kdcServer>
+-->
+  <ntpServer ipPort="60123">
+    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
+  </ntpServer>
+<!--  missing atou=users,dc=example,dc=com
+  <dnsServer ipPort="8053">
+    <directoryService>#directoryService</directoryService>
+    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
+  </dnsServer>
+-->
 
-    <!-- The list of supported authentication mechanisms.                   -->
-    <property name="supportedMechanisms">
-      <list>
-        <value>SIMPLE</value>
-        <value>CRAM-MD5</value>
-        <value>DIGEST-MD5</value>
-        <!--<value>GSSAPI</value>-->
-      </list>
-    </property>
+  <ldapService id="ldapsService"
+              enabled="true"
+              ipPort="10636"
+              enableLdaps="true">
+    <directoryService>#directoryService</directoryService>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
+  </ldapService>
+
+
+  <ldapService id="ldapService"
+              ipPort="10389"
+              allowAnonymousAccess="false"
+              saslHost="ldap.example.com"
+              saslPrincipal="ldap/ldap.example.com@EXAMPLE.COM"
+              searchBaseDn="ou=users,ou=system"
+              maxTimeLimit="15000"
+              maxSizeLimit="1000">
 
-    <!-- The FQDN of this SASL host, validated during SASL negotiation.     -->
-    <property name="saslHost" value="ldap.example.com" />
+    <directoryService>#directoryService</directoryService>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
 
-    <!-- The Kerberos principal name for this LDAP service, used by GSSAPI. -->
-    <property name="saslPrincipal" value="ldap/ldap.example.com@EXAMPLE.COM" />
+    <!-- The list of supported authentication mechanisms.                   -->
+    <saslMechanismHandlers>
+      <simpleMechanismHandler mech-name="SIMPLE"/>
+      <cramMd5MechanismHandler mech-name="CRAM-MD5" />
+      <digestMd5MechanismHandler mech-name="DIGEST-MD5" />
+      <gssapiMechanismHandler mech-name="GSSAPI" />
+      <ntlmMechanismHandler mech-name="NTLM" ntlmProviderFqcn="com.foo.Bar"/>
+      <ntlmMechanismHandler mech-name="GSS-SPNEGO" ntlmProviderFqcn="com.foo.Bar"/>
+    </saslMechanismHandlers>
 
     <!-- The desired quality-of-protection, used by DIGEST-MD5 and GSSAPI.  -->
-    <property name="saslQop">
-      <list>
-        <value>auth</value>
-        <value>auth-int</value>
-        <value>auth-conf</value>
-      </list>
-    </property>
+    <saslQop>
+      <s:value>auth</s:value>
+      <s:value>auth-int</s:value>
+      <s:value>auth-conf</s:value>
+    </saslQop>
 
     <!-- The realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI. -->
-    <property name="saslRealms">
-      <list>
-        <value>example.com</value>
-        <value>apache.org</value>
-      </list>
-    </property>
-
-    <!-- The base DN containing users that can be SASL authenticated.       -->
-    <property name="searchBaseDn" value="ou=users,ou=system" />
-
-    <!-- SSL CONFIG CAN GO HERE-->
-
-    <!-- limits searches by non-admin users to a max time of 15000          -->
-    <!-- milliseconds and has a default value of 10000                      -->
-    <property name="maxTimeLimit" value="15000" />
-
-    <!-- limits searches to max size of 1000 entries: default value is 100  -->
-    <property name="maxSizeLimit" value="1000" />
+    <saslRealms>
+      <s:value>example.com</s:value>
+      <s:value>apache.org</s:value>
+    </saslRealms>
 
     <!-- the collection of extended operation handlers to install           -->
-    <property name="extendedOperationHandlers">
-      <list>
-        <!--<bean class="org.apache.directory.server.ldap.support.starttls.StartTlsHandler"/>-->
-        <bean class="org.apache.directory.server.ldap.support.extended.GracefulShutdownHandler"/>
-        <bean class="org.apache.directory.server.ldap.support.extended.LaunchDiagnosticUiHandler"/>
-        <!-- The Stored Procedure Extended Operation is not stable yet and it may cause security risks.
-        <bean class="org.apache.directory.server.ldap.support.extended.StoredProcedureExtendedOperationHandler"/>
-        -->
-      </list>
-    </property>
-  </bean>
-
-  <bean id="configuration" class="org.apache.directory.server.configuration.MutableServerStartupConfiguration">
-    <property name="workingDirectory" value="example.com" />
-
-    <!-- Uncomment below to have the server load entries on startup!        -->
-    <!-- ldifDirectory property can point to a relative file, directory or  -->
-    <!-- can point to an absolute path to either using the URL path         -->
-    <!-- notation: i.e. file:///Users/jack/apacheds/ldifs                   -->
-
-    <property name="ldifDirectory">
-      <value>ldif</value>
-    </property>
-
-    <!-- Entries will optionally be filtered using LdifLoadFilters in the   -->
-    <!-- order specified.                                                   -->
-    <!--
-    <property name="ldifFilters">
-      <list>
-        <bean class="com.example.MyEntryFilter"/>
-      </list>
-    </property>
-    -->
-
-    <!-- the number of milliseconds before issuing a synch (flush to disk)  -->
-    <!-- which writes out dirty pages back to disk.  To turn off synchs all -->
-    <!-- together simply set this value to <= 0.  Make sure you turn on     -->
-    <!-- synchOnWrite for all partitions if you do choose to do this or else-->
-    <!-- writes may never persist to disk.                                  -->
-    <property name="synchPeriodMillis" value="15000" />
-
-    <!-- maximum number of threads used by mina is set to 8: default is 4   -->
-    <property name="maxThreads" value="8" />
-
-    <property name="allowAnonymousAccess" value="false" />
-    <property name="accessControlEnabled" value="false" />
-
-    <!--
-       It's more efficient to keep this feature turned off but you may not like
-       having the creatorsName and modifiersName contain OIDs instead of short
-       attributeType names instead.  So if you want the creatorsName to change
-       from the normalized form which is the internal representation of
-
-            '0.9.2342.19200300.100.1.1=admin,2.5.4.11=system'
-
-       to a more human readabile form like:
-
-            'uid=admin,ou=system'
-
-       then set this property to true.
-    -->
-    <property name="denormalizeOpAttrsEnabled" value="false" />
-
-    <property name="ntpConfiguration" ref="ntpConfiguration" />
-    <property name="dnsConfiguration" ref="dnsConfiguration" />
-    <property name="changePasswordConfiguration" ref="changePasswordConfiguration" />
-    <property name="kdcConfiguration" ref="kdcConfiguration" />
-    <property name="ldapConfiguration" ref="ldapConfiguration" />
-    <property name="ldapsConfiguration" ref="ldapsConfiguration" />
-
-    <property name="systemPartitionConfiguration" ref="systemPartitionConfiguration" />
-
-    <property name="partitionConfigurations">
-      <set>
-        <ref bean="examplePartitionConfiguration"/>
-      </set>
-    </property>
-
-    <property name="interceptorConfigurations">
-      <list>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="normalizationService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.normalization.NormalizationService" />
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="authenticationService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.authn.AuthenticationService" />
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="referralService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.referral.ReferralService" />
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="authorizationService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.authz.AuthorizationService" />
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="defaultAuthorizationService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.authz.DefaultAuthorizationService" />
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="exceptionService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.exception.ExceptionService" />
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="operationalAttributeService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.operational.OperationalAttributeService" />
-        </bean>
-        <!-- Uncomment to enable the password policy service
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="passwordPolicyService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.kerberos.PasswordPolicyService" />
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="keyDerivationService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.kerberos.KeyDerivationService" />
-        </bean>
-        -->
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="schemaService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.schema.SchemaService" />
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="subentryService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.subtree.SubentryService" />
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="collectiveAttributeService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.collective.CollectiveAttributeService" />
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="eventService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.event.EventService" />
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name" value="triggerService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.server.core.trigger.TriggerService" />
-        </bean>
-
-        <!-- Uncomment to enable replication service
-        <bean class="org.apache.directory.mitosis.configuration.MutableReplicationInterceptorConfiguration">
-          <property name="name" value="replicationService" />
-          <property name="interceptorClassName"
-            value="org.apache.directory.mitosis.service.ReplicationService" />
-          <property name="replicationConfiguration">
-            <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" value="instance_b@localhost:10392" />
-            </bean>
-          </property>
-        </bean>
-        -->
-      </list>
-    </property>
-  </bean>
-
-  <!-- use the following partitionConfiguration to override defaults for  -->
-  <!-- the system partition                                               -->
-  <bean id="systemPartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
-    <property name="id" value="system" />
-    <property name="cacheSize" value="100" />
-    <property name="suffix" value="ou=system" />
-    <property name="partitionClassName"
-      value="org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition" />
-    <!-- the optimizer is enabled by default but may not always be what     -->
-    <!-- you want if your queries are really simple                         -->
-    <property name="optimizerEnabled" value="true" />
-
-    <!--
-      Synchronization on writes does not wait for synch operations
-      to flush dirty pages.  Writes persist immediately to disk at
-      a cost to performance with increased data integrity.  Otherwise
-      the periodic synch operation will flush dirty pages using the
-      synchPeriodMillis parameter in the main configuration.
-    -->
-    <property name="synchOnWrite" value="true" />
-    <property name="indexedAttributes">
-      <set>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.1" />
-          <property name="cacheSize" value="100" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.2" />
-          <property name="cacheSize" value="100" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.3" />
-          <property name="cacheSize" value="100" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.4" />
-          <property name="cacheSize" value="100" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.5" />
-          <property name="cacheSize" value="10" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.6" />
-          <property name="cacheSize" value="10" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.7" />
-          <property name="cacheSize" value="10" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="ou" />
-          <property name="cacheSize" value="100" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="uid" />
-          <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: organizationalUnit
-        objectClass: extensibleObject
-        ou: system
-      </value>
-    </property>
-  </bean>
-
-
-  <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
-    <property name="id" value="example" />
-    <property name="cacheSize" value="100" />
-    <property name="suffix" value="dc=example,dc=com" />
-    <property name="partitionClassName"
-      value="org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition" />
-
-    <!-- the optimizer is enabled by default but may not always be what     -->
-    <!-- you want if your queries are really simple                         -->
-    <property name="optimizerEnabled" value="true" />
-
-    <!--
-      Synchronization on writes does not wait for synch operations
-      to flush dirty pages.  Writes persist immediately to disk at
-      a cost to performance with increased data integrity.  Otherwise
-      the periodic synch operation will flush dirty pages using the
-      synchPeriodMillis parameter in the main configuration.
-    -->
-    <property name="synchOnWrite" value="true" />
-    <property name="indexedAttributes">
-      <set>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.1" />
-          <property name="cacheSize" value="100" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.2" />
-          <property name="cacheSize" value="100" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.3" />
-          <property name="cacheSize" value="100" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.4" />
-          <property name="cacheSize" value="100" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.5" />
-          <property name="cacheSize" value="10" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.6" />
-          <property name="cacheSize" value="10" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.7" />
-          <property name="cacheSize" value="10" />
-        </bean>
-
-        <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="ou" />
-          <property name="cacheSize" value="100" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="krb5PrincipalName" />
-          <property name="cacheSize" value="100" />
-        </bean>
-        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
-          <property name="attributeId" value="uid" />
-          <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>
-
-  <bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
-    <property name="customEditors">
-      <map>
-        <entry key="javax.naming.directory.Attributes">
-          <bean class="org.apache.directory.server.core.configuration.AttributesPropertyEditor"/>
-        </entry>
-      </map>
-   </property>
-  </bean>
-</beans>
+    <extendedOperationHandlers>
+      <startTlsHandler/>
+      <gracefulShutdownHandler/>
+      <launchDiagnosticUiHandler/>
+      <!-- The Stored Procedure Extended Operation is not stable yet and it may cause security risks.-->
+      <!--storedProcedureExtendedOperationHandler/-->
+    </extendedOperationHandlers>
+  </ldapService>
+
+
+  <apacheDS id="apacheDS"
+            synchPeriodMillis="15000"
+            allowAnonymousAccess="false">
+
+    <directoryService>#directoryService</directoryService>
+    <ldapService>#ldapService</ldapService>
+    <ldapsService>#ldapsService</ldapsService>
+  </apacheDS>
+
+  <!-- another bean I didn't convert -->
+  <spring:bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+    <spring:property name="customEditors">
+      <spring:map>
+        <spring:entry key="javax.naming.directory.Attributes">
+          <spring:bean class="org.apache.directory.server.core.configuration.AttributesPropertyEditor"/>
+        </spring:entry>
+      </spring:map>
+    </spring:property>
+  </spring:bean>
+</spring:beans>

Modified: geronimo/plugins/directory/branches/1.0/geronimo-directory-server/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/branches/1.0/geronimo-directory-server/pom.xml?rev=708950&r1=708949&r2=708950&view=diff
==============================================================================
--- geronimo/plugins/directory/branches/1.0/geronimo-directory-server/pom.xml (original)
+++ geronimo/plugins/directory/branches/1.0/geronimo-directory-server/pom.xml Wed Oct 29 10:45:56 2008
@@ -1,118 +1,102 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!-- $Rev$ $Date$ -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <artifactId>directory-parent</artifactId>
-    <groupId>org.apache.geronimo.plugins</groupId>
-    <version>1.0.1-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.apache.geronimo.assemblies</groupId>
-  <artifactId>geronimo-directory-server</artifactId>
-  <packaging>application-assembly</packaging>
-  <name>Apache Geronimo Sample Server running Apache Directory</name>
-  <description>Sample Geronimo server running Apache Directory.  Not suitable for distribution
-  as it does not contain required legal files.</description>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.geronimo.genesis.plugins</groupId>
-        <artifactId>tools-maven-plugin</artifactId>
-        <extensions>true</extensions>
-          <executions>
-              <execution>
-                  <id>verify-legal-files</id>
-                  <phase>verify</phase>
-                  <goals>
-                      <goal>verify-legal-files</goal>
-                  </goals>
-                  <configuration>
-                      <!-- Fail the build if no legal files were found -->
-                      <strict>false</strict>
-                  </configuration>
-              </execution>
-          </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.geronimo.buildsupport</groupId>
-        <artifactId>car-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>install</id>
-            <phase>compile</phase>
-            <goals>
-              <goal>install-modules</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>archive</id>
-            <phase>package</phase>
-            <goals>
-              <goal>archive</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <servers>
-            <serverInstance>
-              <name>default</name>
-              <configFile>var/config/config.xml</configFile>
-              <configSubstitutionsFile>var/config/config-substitutions.properties</configSubstitutionsFile>
-              <configSubstitutionsPrefix>org.apache.geronimo.config.substitution.</configSubstitutionsPrefix>
-              <artifactAliasesFile>var/config/artifact_aliases.properties</artifactAliasesFile>
-            </serverInstance>
-              <serverInstance>
-                  <name>client</name>
-                  <attributeManagerFrom>default</attributeManagerFrom>
-                  <artifactAliasesFile>var/config/client_artifact_aliases.properties</artifactAliasesFile>
-              </serverInstance>
-              <serverInstance>
-                  <name>jsr88</name>
-                  <configFile>var/config/jsr88-configurer-config.xml</configFile>
-                  <configSubstitutionsFile>var/config/config-substitutions.properties</configSubstitutionsFile>
-                  <configSubstitutionsPrefix>org.apache.geronimo.config.substitution.</configSubstitutionsPrefix>
-                  <artifactAliasesFile>var/config/artifact_aliases.properties</artifactAliasesFile>
-              </serverInstance>
-          </servers>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.geronimo.assemblies</groupId>
-      <artifactId>geronimo-boilerplate-minimal</artifactId>
-      <version>${geronimoVersion}</version>
-    </dependency>
-      <!-- allow installation of additional modules -->
-    <dependency>
-      <groupId>org.apache.geronimo.framework</groupId>
-      <artifactId>plugin</artifactId>
-      <version>${geronimoVersion}</version>
-      <type>car</type>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.plugins</groupId>
-      <artifactId>directory</artifactId>
-      <version>1.0.1-SNAPSHOT</version>
-      <type>car</type>
-    </dependency>
-  </dependencies>
-</project>
+<?xml version="1.0"?>
+<project>
+    <parent>
+        <artifactId>directory-parent</artifactId>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <version>1.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.geronimo.assemblies</groupId>
+    <artifactId>geronimo-directory-server</artifactId>
+    <packaging>application-assembly</packaging>
+    <name>Sample Geronimo server running Apache Directory</name>
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.geronimo.buildsupport</groupId>
+                    <artifactId>car-maven-plugin</artifactId>
+                    <version>${geronimoVersion}</version>
+                    <extensions>true</extensions>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.geronimo.genesis.plugins</groupId>
+                    <artifactId>tools-maven-plugin</artifactId>
+                    <version>1.3</version>
+                    <extensions>true</extensions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.geronimo.genesis.plugins</groupId>
+                <artifactId>tools-maven-plugin</artifactId>
+                <extensions>true</extensions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>install</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>install-modules</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>archive</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>archive</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <servers>
+                        <serverInstance>
+                            <name>default</name>
+                            <configFile>var/config/config.xml</configFile>
+                            <configSubstitutionsFile>var/config/config-substitutions.properties</configSubstitutionsFile>
+                            <configSubstitutionsPrefix>org.apache.geronimo.config.substitution.</configSubstitutionsPrefix>
+                            <artifactAliasesFile>var/config/artifact_aliases.properties</artifactAliasesFile>
+                        </serverInstance>
+                        <serverInstance>
+                            <name>client</name>
+                            <attributeManagerFrom>default</attributeManagerFrom>
+                            <artifactAliasesFile>var/config/client_artifact_aliases.properties</artifactAliasesFile>
+                        </serverInstance>
+                        <serverInstance>
+                            <name>jsr88</name>
+                            <configFile>var/config/jsr88-configurer-config.xml</configFile>
+                            <configSubstitutionsFile>var/config/config-substitutions.properties</configSubstitutionsFile>
+                            <configSubstitutionsPrefix>org.apache.geronimo.config.substitution.</configSubstitutionsPrefix>
+                            <artifactAliasesFile>var/config/artifact_aliases.properties</artifactAliasesFile>
+                        </serverInstance>
+                    </servers>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.assemblies</groupId>
+            <artifactId>geronimo-boilerplate-minimal</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>jar</type>
+        </dependency>
+        <!-- allow installation of additional modules -->
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>plugin</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.plugins</groupId>
+            <artifactId>directory</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

Modified: geronimo/plugins/directory/branches/1.0/geronimo-directory/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/branches/1.0/geronimo-directory/pom.xml?rev=708950&r1=708949&r2=708950&view=diff
==============================================================================
--- geronimo/plugins/directory/branches/1.0/geronimo-directory/pom.xml (original)
+++ geronimo/plugins/directory/branches/1.0/geronimo-directory/pom.xml Wed Oct 29 10:45:56 2008
@@ -18,7 +18,8 @@
 
 <!-- $Rev$ $Date$ -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
 
@@ -26,11 +27,10 @@
         <groupId>org.apache.geronimo.plugins</groupId>
         <artifactId>directory-parent</artifactId>
         <version>1.0.1-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>geronimo-directory</artifactId>
-    <name>Apache Geronimo-Apache Directory Server integration code</name>
+    <name>Geronimo :: Directory Plugin</name>
 
     <dependencies>
 
@@ -54,6 +54,29 @@
             <groupId>org.apache.directory.server</groupId>
             <artifactId>apacheds-server-jndi</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-bootstrap-partition</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-xbean-spring</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>mitosis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.directory.server</groupId>
+            <artifactId>apacheds-protocol-ntp</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.directory.shared</groupId>
+            <artifactId>shared-ldap</artifactId>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.directory.daemon</groupId>
@@ -90,12 +113,6 @@
             <artifactId>xbean-spring</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-bootstrap-partition</artifactId>
-            <scope>test</scope>
-        </dependency>
-
     </dependencies>
 
 </project>

Modified: geronimo/plugins/directory/branches/1.0/geronimo-directory/src/main/java/org/apache/geronimo/directory/DirectoryGBean.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/branches/1.0/geronimo-directory/src/main/java/org/apache/geronimo/directory/DirectoryGBean.java?rev=708950&r1=708949&r2=708950&view=diff
==============================================================================
--- geronimo/plugins/directory/branches/1.0/geronimo-directory/src/main/java/org/apache/geronimo/directory/DirectoryGBean.java (original)
+++ geronimo/plugins/directory/branches/1.0/geronimo-directory/src/main/java/org/apache/geronimo/directory/DirectoryGBean.java Wed Oct 29 10:45:56 2008
@@ -18,18 +18,14 @@
 package org.apache.geronimo.directory;
 
 import java.io.File;
+import java.io.IOException;
 import java.net.MalformedURLException;
-import java.util.Properties;
 
-import javax.naming.Context;
 import javax.naming.NamingException;
-import javax.naming.directory.InitialDirContext;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.directory.server.configuration.MutableServerStartupConfiguration;
-import org.apache.directory.server.core.configuration.ShutdownConfiguration;
-import org.apache.directory.server.jndi.ServerContextFactory;
+import org.apache.directory.server.configuration.ApacheDS;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
@@ -46,16 +42,16 @@
 
     private static final Log log = LogFactory.getLog(DirectoryGBean.class);
 
-    /**
-     * Geronimo class loader
-     */
-    private ClassLoader classLoader;
     private static final String DEFAULT_WORKING_DIRECTORY = "var/directory";
+    private static final String DEFAULT_CONFIG_FILE = "/server.xml";
+    private ApacheDS apacheDS;
+    private Thread workerThread;
+    private SynchWorker worker = new SynchWorker();
+    private FileSystemXmlApplicationContext factory;
 
     public DirectoryGBean(String workingDir,
                           String configFile,
-                          String providerURL, ServerInfo serverInfo,
-                          ClassLoader classLoader) throws NamingException, MalformedURLException {
+                          ServerInfo serverInfo) throws Exception {
 
         if (serverInfo == null) {
             throw new IllegalArgumentException("Must have a ServerInfo value in initParams.");
@@ -63,19 +59,20 @@
         if (workingDir == null) {
             workingDir = DEFAULT_WORKING_DIRECTORY;
         }
-        this.classLoader = classLoader;
+        if (configFile == null) {
+            configFile = workingDir + DEFAULT_CONFIG_FILE;
+        }
+        File workingD = serverInfo.resolveServer(workingDir);
         File configF = serverInfo.resolveServer(configFile);
-        ApplicationContext factory = new FileSystemXmlApplicationContext(configF.toURL().toString());
-        MutableServerStartupConfiguration cfg = (MutableServerStartupConfiguration) factory.getBean("configuration");
-        Properties env = (Properties) factory.getBean("environment");
-        env.setProperty(Context.PROVIDER_URL, providerURL);
-        env.setProperty(Context.INITIAL_CONTEXT_FACTORY, ServerContextFactory.class.getName());
-
-        File workingDirFile = serverInfo.resolveServer(workingDir);
-        cfg.setWorkingDirectory(workingDirFile);
+        factory = new FileSystemXmlApplicationContext(configF.toURL().toString());
+        apacheDS = ( ApacheDS ) factory.getBean( "apacheDS" );
+        apacheDS.getDirectoryService().setWorkingDirectory(workingD);
+        apacheDS.startup();
+        if ( apacheDS.getSynchPeriodMillis() > 0 )
+        {
+            workerThread = new Thread( worker, "SynchWorkerThread" );
+        }
 
-        env.putAll(cfg.toJndiEnvironment());
-        new InitialDirContext(env);
     }
 
 
@@ -92,22 +89,59 @@
     }
 
     public void doStop() throws Exception {
-        log.debug("Stopping LDAP Directory service");
-        Properties env = new Properties();
-        env.putAll(new ShutdownConfiguration().toJndiEnvironment());
-        env.put(Context.INITIAL_CONTEXT_FACTORY, ServerContextFactory.class.getName());
-        //The values of these env props are more or less irrelevant, see DIRSERVER-1002
-        env.put(Context.SECURITY_AUTHENTICATION, "simple");
-        env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
-        env.put(Context.SECURITY_CREDENTIALS, "secret");
+        if ( workerThread != null )
+        {
+            worker.stop = true;
+            synchronized ( worker.lock )
+            {
+                worker.lock.notify();
+            }
+
+            while ( workerThread.isAlive() )
+            {
+                log.info( "Waiting for SynchWorkerThread to die." );
+                workerThread.join( 500 );
+            }
+        }
 
-        ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
-        Thread.currentThread().setContextClassLoader(classLoader);
+        if (factory != null)
+        {
+            factory.close();
+        }
+        apacheDS.shutdown();
+    }
 
-        try {
-            new InitialDirContext(env);
-        } finally {
-            Thread.currentThread().setContextClassLoader(oldCL);
+    class SynchWorker implements Runnable
+    {
+        final Object lock = new Object();
+        boolean stop;
+
+
+        public void run()
+        {
+            while ( !stop )
+            {
+                synchronized ( lock )
+                {
+                    try
+                    {
+                        lock.wait( apacheDS.getSynchPeriodMillis() );
+                    }
+                    catch ( InterruptedException e )
+                    {
+                        log.warn( "SynchWorker failed to wait on lock.", e );
+                    }
+                }
+
+                try
+                {
+                    apacheDS.getDirectoryService().sync();
+                }
+                catch ( Exception e )
+                {
+                    log.error( "SynchWorker failed to synch directory.", e );
+                }
+            }
         }
     }
 
@@ -118,11 +152,9 @@
 
         infoFactory.addAttribute("workingDir", String.class, true);
         infoFactory.addAttribute("configFile", String.class, true);
-        infoFactory.addAttribute("providerURL", String.class, true);
         infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
-        infoFactory.addAttribute("classLoader", ClassLoader.class, false);
 
-        infoFactory.setConstructor(new String[]{"workingDir", "configFile", "providerURL", "ServerInfo", "classLoader"});
+        infoFactory.setConstructor(new String[]{"workingDir", "configFile", "ServerInfo"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/plugins/directory/branches/1.0/geronimo-directory/src/test/java/org/apache/geronimo/directory/RunningTest.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/branches/1.0/geronimo-directory/src/test/java/org/apache/geronimo/directory/RunningTest.java?rev=708950&r1=708949&r2=708950&view=diff
==============================================================================
--- geronimo/plugins/directory/branches/1.0/geronimo-directory/src/test/java/org/apache/geronimo/directory/RunningTest.java (original)
+++ geronimo/plugins/directory/branches/1.0/geronimo-directory/src/test/java/org/apache/geronimo/directory/RunningTest.java Wed Oct 29 10:45:56 2008
@@ -85,13 +85,7 @@
         String path = configURL.getPath();
         path = path.substring(0, path.lastIndexOf("/"));
         ServerInfo serverInfo = new BasicServerInfo(path);
-        directory = new DirectoryGBean(null, "server.xml", "ou=system", serverInfo, cl);
-//        directory.setEnableNetworking(true);
-//        directory.setPort(9389);
-//        directory.setProviderURL("ou=system");
-//        directory.setSecurityAuthentication("simple");
-//        directory.setSecurityCredentials(CREDENTIALS);
-//        directory.setSecurityPrincipal(PRINCIPAL);
+        directory = new DirectoryGBean(null, "server.xml", serverInfo);
         directory.doStart();