You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2006/07/31 18:28:07 UTC

svn commit: r427156 [5/5] - in /directory/branches/apacheds/1.0: benchmarks/ benchmarks/src/ benchmarks/src/main/ benchmarks/src/main/java/ benchmarks/src/main/java/org/ benchmarks/src/main/java/org/apache/ benchmarks/src/main/java/org/apache/directory...

Modified: directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/GracefulShutdownHandler.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/GracefulShutdownHandler.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/GracefulShutdownHandler.java (original)
+++ directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/GracefulShutdownHandler.java Mon Jul 31 09:27:52 2006
@@ -30,7 +30,7 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
-import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
+import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
 import org.apache.directory.server.ldap.LdapProtocolProvider;
 import org.apache.directory.server.ldap.SessionRegistry;
@@ -95,7 +95,7 @@
 
         // make sue only the administrator can issue this shutdown request if 
         // not we respond to the requestor with with insufficientAccessRights(50)
-        if ( !slc.getPrincipal().getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+        if ( !slc.getPrincipal().getName().equalsIgnoreCase( PartitionNexus.ADMIN_PRINCIPAL ) )
         {
             if ( log.isInfoEnabled() )
             {
@@ -118,7 +118,7 @@
         GracefulShutdownRequest gsreq = ( GracefulShutdownRequest ) req;
 
         // build the graceful disconnect message with replicationContexts
-        DirectoryPartitionNexus nexus = service.getConfiguration().getPartitionNexus();
+        PartitionNexus nexus = service.getConfiguration().getPartitionNexus();
         GracefulDisconnect notice = getGracefulDisconnect( gsreq.getTimeOffline(), gsreq.getDelay(), nexus );
 
         // send (synch) the GracefulDisconnect to each client before unbinding
@@ -208,7 +208,7 @@
         {
             for ( Iterator i = sessions.iterator(); i.hasNext(); )
             {
-                IoSession session = session = ( IoSession ) i.next();
+                IoSession session = ( IoSession ) i.next();
 
                 // make sure we do not send the disconnect mesasge to the 
                 // client which sent the initiating GracefulShutdown request
@@ -260,7 +260,7 @@
         {
             for ( Iterator i = sessions.iterator(); i.hasNext(); )
             {
-                IoSession session = session = ( IoSession ) i.next();
+                IoSession session = ( IoSession ) i.next();
 
                 // make sure we do not send the disconnect mesasge to the 
                 // client which sent the initiating GracefulShutdown request
@@ -298,7 +298,7 @@
     }
 
 
-    public static GracefulDisconnect getGracefulDisconnect( int timeOffline, int delay, DirectoryPartitionNexus nexus )
+    public static GracefulDisconnect getGracefulDisconnect( int timeOffline, int delay, PartitionNexus nexus )
     {
         // build the graceful disconnect message with replicationContexts
         GracefulDisconnect notice = new GracefulDisconnect( timeOffline, delay );

Modified: directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java (original)
+++ directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java Mon Jul 31 09:27:52 2006
@@ -31,9 +31,9 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
-import org.apache.directory.server.core.partition.DirectoryPartition;
-import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
-import org.apache.directory.server.core.partition.impl.btree.BTreeDirectoryPartition;
+import org.apache.directory.server.core.partition.Partition;
+import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
 import org.apache.directory.server.core.partition.impl.btree.gui.PartitionFrame;
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
 import org.apache.directory.server.ldap.LdapProtocolProvider;
@@ -79,7 +79,7 @@
             ServerLdapContext slc = ( ServerLdapContext ) ctx;
             DirectoryService service = slc.getService();
 
-            if ( !slc.getPrincipal().getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+            if ( !slc.getPrincipal().getName().equalsIgnoreCase( PartitionNexus.ADMIN_PRINCIPAL ) )
             {
                 requestor.write( new LaunchDiagnosticUiResponse( req.getMessageId(),
                     ResultCodeEnum.INSUFFICIENTACCESSRIGHTS ) );
@@ -88,16 +88,16 @@
 
             requestor.write( new LaunchDiagnosticUiResponse( req.getMessageId() ) );
 
-            DirectoryPartitionNexus nexus = service.getConfiguration().getPartitionNexus();
+            PartitionNexus nexus = service.getConfiguration().getPartitionNexus();
             Iterator list = nexus.listSuffixes();
             int launchedWindowCount = 0;
             while ( list.hasNext() )
             {
                 LdapDN dn = new LdapDN( ( String ) list.next() );
-                DirectoryPartition partition = nexus.getPartition( dn );
-                if ( partition instanceof BTreeDirectoryPartition )
+                Partition partition = nexus.getPartition( dn );
+                if ( partition instanceof BTreePartition )
                 {
-                    BTreeDirectoryPartition btPartition = ( BTreeDirectoryPartition ) partition;
+                    BTreePartition btPartition = ( BTreePartition ) partition;
                     PartitionFrame frame = new PartitionFrame( btPartition, btPartition.getSearchEngine() );
                     Point pos = getCenteredPosition( frame );
                     pos.y = launchedWindowCount * 20 + pos.y;

Modified: directory/branches/apacheds/1.0/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java (original)
+++ directory/branches/apacheds/1.0/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java Mon Jul 31 09:27:52 2006
@@ -21,8 +21,10 @@
 
 import junit.framework.TestCase;
 
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.ldap.LdapProtocolProvider;
 import org.apache.directory.server.ldap.support.ExtendedHandler;
+import org.apache.directory.server.ldap.support.LdapMessageHandler;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.AbandonRequest;
@@ -45,8 +47,8 @@
 import org.apache.directory.shared.ldap.message.SearchRequestImpl;
 import org.apache.directory.shared.ldap.message.UnbindRequest;
 import org.apache.directory.shared.ldap.message.UnbindRequestImpl;
+
 import org.apache.mina.common.IoSession;
-import org.apache.mina.handler.demux.MessageHandler;
 
 
 /**
@@ -67,7 +69,7 @@
      */
     public void testDefaultOperation() throws LdapNamingException
     {
-        LdapProtocolProvider provider = new LdapProtocolProvider();
+        LdapProtocolProvider provider = new LdapProtocolProvider( new StartupConfiguration(), new Properties() );
         assertNotNull( provider.getCodecFactory() );
         assertTrue( provider.getName() == LdapProtocolProvider.SERVICE_NAME );
     }
@@ -114,80 +116,116 @@
         props.setProperty( UnbindRequest.class.getName(), BogusUnbindHandler.class.getName() );
         props.setProperty( UnbindRequestImpl.class.getName(), BogusUnbindHandler.class.getName() );
 
-        LdapProtocolProvider provider = new LdapProtocolProvider( props );
+        LdapProtocolProvider provider = new LdapProtocolProvider( new StartupConfiguration(), props );
         assertNotNull( provider.getCodecFactory() );
         assertTrue( provider.getName() == LdapProtocolProvider.SERVICE_NAME );
     }
 
-    public static class BogusAbandonHandler implements MessageHandler
+    public static class BogusAbandonHandler implements LdapMessageHandler
     {
         public void messageReceived( IoSession session, Object request )
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
+
+        public void init( StartupConfiguration cfg )
+        {
+        }
     }
 
-    public static class BogusUnbindHandler implements MessageHandler
+    public static class BogusUnbindHandler implements LdapMessageHandler
     {
         public void messageReceived( IoSession session, Object request )
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
+
+        public void init( StartupConfiguration cfg )
+        {
+        }
     }
 
-    public static class BogusAddHandler implements MessageHandler
+    public static class BogusAddHandler implements LdapMessageHandler
     {
         public void messageReceived( IoSession session, Object request )
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
+
+        public void init( StartupConfiguration cfg )
+        {
+        }
     }
 
-    public static class BogusBindHandler implements MessageHandler
+    public static class BogusBindHandler implements LdapMessageHandler
     {
         public void messageReceived( IoSession session, Object request )
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
+
+        public void init( StartupConfiguration cfg )
+        {
+        }
     }
 
-    public static class BogusCompareHandler implements MessageHandler
+    public static class BogusCompareHandler implements LdapMessageHandler
     {
         public void messageReceived( IoSession session, Object request )
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
+
+        public void init( StartupConfiguration cfg )
+        {
+        }
     }
 
-    public static class BogusDeleteHandler implements MessageHandler
+    public static class BogusDeleteHandler implements LdapMessageHandler
     {
         public void messageReceived( IoSession session, Object request )
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
+
+        public void init( StartupConfiguration cfg )
+        {
+        }
     }
 
-    public static class BogusModifyDnHandler implements MessageHandler
+    public static class BogusModifyDnHandler implements LdapMessageHandler
     {
         public void messageReceived( IoSession session, Object request )
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
+
+        public void init( StartupConfiguration cfg )
+        {
+        }
     }
 
-    public static class BogusModifyHandler implements MessageHandler
+    public static class BogusModifyHandler implements LdapMessageHandler
     {
         public void messageReceived( IoSession session, Object request )
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
+
+        public void init( StartupConfiguration cfg )
+        {
+        }
     }
 
-    public static class BogusSearchHandler implements MessageHandler
+    public static class BogusSearchHandler implements LdapMessageHandler
     {
         public void messageReceived( IoSession session, Object request )
         {
             throw new NotImplementedException( "handler not implemented!" );
+        }
+
+        public void init( StartupConfiguration cfg )
+        {
         }
     }
 }

Modified: directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java (original)
+++ directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java Mon Jul 31 09:27:52 2006
@@ -44,8 +44,8 @@
 
 import junit.framework.TestCase;
 
-import org.apache.directory.server.core.configuration.DirectoryPartitionConfiguration;
-import org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration;
+import org.apache.directory.server.core.configuration.PartitionConfiguration;
+import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
 import org.apache.directory.server.core.configuration.MutableStartupConfiguration;
 import org.apache.directory.server.core.configuration.ShutdownConfiguration;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
@@ -164,9 +164,9 @@
     }
 
 
-    private DirectoryPartitionConfiguration getExamplePartition() throws NamingException
+    private PartitionConfiguration getExamplePartition() throws NamingException
     {
-        MutableDirectoryPartitionConfiguration partConfig = new MutableDirectoryPartitionConfiguration();
+        MutablePartitionConfiguration partConfig = new MutablePartitionConfiguration();
         partConfig.setName( "example" );
 
         HashSet indices = new HashSet();
@@ -191,9 +191,9 @@
     }
 
 
-    private DirectoryPartitionConfiguration getApachePartition() throws NamingException
+    private PartitionConfiguration getApachePartition() throws NamingException
     {
-        MutableDirectoryPartitionConfiguration partConfig = new MutableDirectoryPartitionConfiguration();
+        MutablePartitionConfiguration partConfig = new MutablePartitionConfiguration();
         partConfig.setName( "apache" );
 
         HashSet indices = new HashSet();

Modified: directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/Krb5KdcEntryFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/Krb5KdcEntryFilter.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/Krb5KdcEntryFilter.java (original)
+++ directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/Krb5KdcEntryFilter.java Mon Jul 31 09:27:52 2006
@@ -1,3 +1,19 @@
+/*
+ *   Copyright 2006 The Apache Software Foundation
+ *
+ *   Licensed 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.
+ *
+ */
 package org.apache.directory.server.protocol.shared.store;
 
 

Modified: directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifLoadFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifLoadFilter.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifLoadFilter.java (original)
+++ directory/branches/apacheds/1.0/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifLoadFilter.java Mon Jul 31 09:27:52 2006
@@ -1,3 +1,19 @@
+/*
+ *   Copyright 2006 The Apache Software Foundation
+ *
+ *   Licensed 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.
+ *
+ */
 package org.apache.directory.server.protocol.shared.store;
 
 

Modified: directory/branches/apacheds/1.0/server-installers/README.txt
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-installers/README.txt?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-installers/README.txt (original)
+++ directory/branches/apacheds/1.0/server-installers/README.txt Mon Jul 31 09:27:52 2006
@@ -19,7 +19,7 @@
 
 The server is designed to run as a Windows Service or as a UNIX Daemon (also
 on MacOSX).  ApacheDS uses commons-daemon procrun and jsvc to install and run
-as a service or daemon respecitively.  These are the only native components 
+as a service or daemon respectively.  These are the only native components 
 specific to the targeted operating system.
 
 You can start, and stop the daemon on UNIX using the /etc/init.d/apacheds 
@@ -30,7 +30,7 @@
 on startup.
 
 On windows the server can be started like any other service using the services
-console via Microsoft Management Console.  It can also be started, stoped and
+console via Microsoft Management Console.  It can also be started, stopped and
 configured using the procrun service manager installed for it: see 
 Start->All Programs->apacheds->Service Setttings. A tray icon can also be 
 launched for the application to monitor it and to control the service: see 

Modified: directory/branches/apacheds/1.0/server-installers/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-installers/pom.xml?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-installers/pom.xml (original)
+++ directory/branches/apacheds/1.0/server-installers/pom.xml Mon Jul 31 09:27:52 2006
@@ -21,7 +21,7 @@
     <dependency>
       <groupId>org.apache.directory.daemon</groupId>
       <artifactId>daemon-bootstrappers</artifactId>
-      <version>1.0-RC2</version>
+      <version>1.0-RC3-SNAPSHOT</version>
       <scope>provided</scope>
     </dependency>  
     <dependency>
@@ -75,7 +75,7 @@
       <plugin>
         <groupId>org.apache.directory.daemon</groupId>
         <artifactId>daemon-plugin</artifactId>
-        <version>1.0-RC2</version>
+        <version>1.0-RC3-SNAPSHOT</version>
         <configuration>
           <excludes>
 
@@ -128,11 +128,13 @@
               <installationBundleId>Binaries</installationBundleId>
             </packagedFile>
           </packagedFiles>
+<!--
           <svnBaseUrl>
             http://svn.apache.org/repos/asf/directory/branches/apacheds/1.0
           </svnBaseUrl>
           <packageSources>true</packageSources>
           <packageDocs>true</packageDocs>
+-->
           <applicationClass>
             org.apache.ldap.server.Service
           </applicationClass>

Modified: directory/branches/apacheds/1.0/server-installers/src/main/installers/server.xml
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-installers/src/main/installers/server.xml?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-installers/src/main/installers/server.xml (original)
+++ directory/branches/apacheds/1.0/server-installers/src/main/installers/server.xml Mon Jul 31 09:27:52 2006
@@ -52,12 +52,32 @@
       </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</value></property>
+
+    <!-- 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</value></property>
+    <!-- limits searches to max size of 1000 entries: default value is 100  -->
+    <property name="maxSizeLimit"><value>1000</value></property>
+    <!-- maximum number of threads used by mina is set to 8: default is 4   -->
+    <property name="maxThreads"><value>8</value></property>
+
     <property name="allowAnonymousAccess"><value>false</value></property>
     <property name="accessControlEnabled"><value>false</value></property>
     <property name="enableNtp"><value>false</value></property>
     <property name="enableKerberos"><value>false</value></property>
     <property name="enableChangePassword"><value>false</value></property>
     <property name="ldapPort"><value>10389</value></property>
+
+    <property name="systemPartitionConfiguration">
+      <ref bean="systemPartitionConfiguration"/>
+    </property>
+
     <property name="contextPartitionConfigurations">
       <set>
         <ref bean="examplePartitionConfiguration"/>
@@ -159,16 +179,149 @@
     </property>
   </bean>
   
-  <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration">
+  <!-- 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="name"><value>system</value></property>
+    <property name="cacheSize"><value>10000</value></property>
+    <property name="suffix"><value>ou=system</value></property>
+
+    <!-- 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</value></property>
+
+    <!--
+      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>false</value></property>
+    <property name="indexedAttributes">
+      <set>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.1</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.2</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.3</value></property>
+          <property name="cacheSize"><value>1000000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.4</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.5</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.6</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.7</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>ou</value></property>
+          <property name="cacheSize"><value>50000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>uid</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>objectClass</value></property>
+          <property name="cacheSize"><value>100000</value></property>
+        </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="name"><value>example</value></property>
+    <property name="cacheSize"><value>10000</value></property>
     <property name="suffix"><value>dc=example,dc=com</value></property>
+
+    <!-- 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</value></property>
+
+    <!--
+      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>false</value></property>
     <property name="indexedAttributes">
       <set>
-        <value>dc</value>
-        <value>ou</value>
-        <value>objectClass</value>
-        <value>krb5PrincipalName</value>
-        <value>uid</value>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.1</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.2</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.3</value></property>
+          <property name="cacheSize"><value>1000000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.4</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.5</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.6</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.7</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>dc</value></property>
+          <property name="cacheSize"><value>1000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>ou</value></property>
+          <property name="cacheSize"><value>50000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>krb5PrincipalName</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>uid</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>objectClass</value></property>
+          <property name="cacheSize"><value>100000</value></property>
+        </bean>
       </set>
     </property>
     <property name="contextEntry">

Modified: directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java (original)
+++ directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java Mon Jul 31 09:27:52 2006
@@ -24,6 +24,8 @@
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.server.core.configuration.PartitionConfiguration;
+
 /**
  * A mutable version of {@link ServerStartupConfiguration}.
  *
@@ -41,6 +43,36 @@
     }
 
 
+    public void setSystemPartitionConfiguration( PartitionConfiguration systemPartitionConfiguration )
+    {
+        super.setSystemPartitionConfiguration( systemPartitionConfiguration );
+    }
+    
+    
+    public void setMaxThreads( int maxThreads )
+    {
+        super.setMaxThreads( maxThreads );
+    }
+    
+    
+    public void setMaxTimeLimit( int maxTimeLimit )
+    {
+        super.setMaxTimeLimit( maxTimeLimit );
+    }
+    
+    
+    public void setMaxSizeLimit( int maxSizeLimit )
+    {
+        super.setMaxSizeLimit( maxSizeLimit );
+    }
+    
+
+    public void setSynchPeriodMillis( long synchPeriodMillis )
+    {
+        super.setSynchPeriodMillis( synchPeriodMillis );
+    }
+    
+    
     public void setAccessControlEnabled( boolean accessControlEnabled )
     {
         super.setAccessControlEnabled( accessControlEnabled );

Modified: directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java (original)
+++ directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java Mon Jul 31 09:27:52 2006
@@ -42,7 +42,10 @@
 {
     private static final long serialVersionUID = -7138616822614155454L;
 
+    private static final long DEFAULT_SYNC_PERIOD_MILLIS = 20000;
+
     private boolean enableNetworking = true;
+    private long synchPeriodMillis = DEFAULT_SYNC_PERIOD_MILLIS;
     private int ldapPort = 389;
     private int ldapsPort = 636;
     private File ldapsCertificateFile = new File( this.getWorkingDirectory().getPath() + File.separator
@@ -293,5 +296,17 @@
 
         this.ldifFilters.clear();
         this.ldifFilters.addAll( filters );
+    }
+
+
+    protected void setSynchPeriodMillis( long synchPeriodMillis )
+    {
+        this.synchPeriodMillis = synchPeriodMillis;
+    }
+
+
+    public long getSynchPeriodMillis()
+    {
+        return synchPeriodMillis;
     }
 }

Modified: directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java (original)
+++ directory/branches/apacheds/1.0/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java Mon Jul 31 09:27:52 2006
@@ -39,7 +39,7 @@
 import org.apache.directory.server.configuration.ServerStartupConfiguration;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
-import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
+import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.kerberos.kdc.KdcConfiguration;
 import org.apache.directory.server.kerberos.kdc.KerberosServer;
 import org.apache.directory.server.kerberos.shared.store.JndiPrincipalStoreImpl;
@@ -55,7 +55,6 @@
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
 import org.apache.mina.common.DefaultIoFilterChainBuilder;
 import org.apache.mina.common.IoAcceptor;
-import org.apache.mina.common.IoFilter;
 import org.apache.mina.common.IoFilterChainBuilder;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.common.WriteFuture;
@@ -63,6 +62,8 @@
 import org.apache.mina.transport.socket.nio.DatagramAcceptor;
 import org.apache.mina.transport.socket.nio.SocketAcceptor;
 import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
+import org.apache.mina.transport.socket.nio.SocketSessionConfig;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -82,10 +83,11 @@
 
     protected static final IoAcceptor tcpAcceptor = new SocketAcceptor();
     protected static final IoAcceptor udpAcceptor = new DatagramAcceptor();
-
+    protected static final ThreadPoolFilter threadPool;
+    
     static
     {
-        IoFilter threadPool = new ThreadPoolFilter();
+        threadPool = new ThreadPoolFilter();
         tcpAcceptor.getFilterChain().addFirst( "threadPool", threadPool );
         udpAcceptor.getFilterChain().addFirst( "threadPool", threadPool );
     }
@@ -103,6 +105,7 @@
 
     public void beforeStartup( DirectoryService service )
     {
+        threadPool.setMaximumPoolSize( service.getConfiguration().getStartupConfiguration().getMaxThreads() );
         this.directoryService = service;
     }
 
@@ -437,7 +440,7 @@
         IoFilterChainBuilder chainBuilder ) throws LdapNamingException, LdapConfigurationException
     {
         // Register all extended operation handlers.
-        LdapProtocolProvider protocolProvider = new LdapProtocolProvider( ( Hashtable ) env.clone() );
+        LdapProtocolProvider protocolProvider = new LdapProtocolProvider( cfg, ( Hashtable ) env.clone() );
 
         for ( Iterator i = cfg.getExtendedOperationHandlers().iterator(); i.hasNext(); )
         {
@@ -445,7 +448,7 @@
             protocolProvider.addExtendedOperationHandler( h );
             log.info( "Added Extended Request Handler: " + h.getOid() );
             h.setLdapProvider( protocolProvider );
-            DirectoryPartitionNexus nexus = directoryService.getConfiguration().getPartitionNexus();
+            PartitionNexus nexus = directoryService.getConfiguration().getPartitionNexus();
             nexus.registerSupportedExtensions( h.getExtensionOids() );
         }
 
@@ -456,7 +459,8 @@
             acceptorCfg.setDisconnectOnUnbind( false );
             acceptorCfg.setReuseAddress( true );
             acceptorCfg.setFilterChainBuilder( chainBuilder );
-
+            ((SocketSessionConfig)(acceptorCfg.getSessionConfig())).setTcpNoDelay( true );
+            
             tcpAcceptor.bind( new InetSocketAddress( port ), protocolProvider.getHandler(), acceptorCfg );
 
             if ( log.isInfoEnabled() )

Modified: directory/branches/apacheds/1.0/server-main/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-main/pom.xml?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-main/pom.xml (original)
+++ directory/branches/apacheds/1.0/server-main/pom.xml Mon Jul 31 09:27:52 2006
@@ -18,7 +18,7 @@
     <dependency>
       <groupId>org.apache.directory.daemon</groupId>
       <artifactId>daemon-bootstrappers</artifactId>
-      <version>1.0-RC2</version>
+      <version>1.0-RC3-SNAPSHOT</version>
     </dependency>  
     <dependency>
       <groupId>org.slf4j</groupId>

Modified: directory/branches/apacheds/1.0/server-main/server.xml
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-main/server.xml?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-main/server.xml (original)
+++ directory/branches/apacheds/1.0/server-main/server.xml Mon Jul 31 09:27:52 2006
@@ -52,12 +52,32 @@
       </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</value></property>
+
+    <!-- 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</value></property>
+    <!-- limits searches to max size of 1000 entries: default value is 100  -->
+    <property name="maxSizeLimit"><value>1000</value></property>
+    <!-- maximum number of threads used by mina is set to 8: default is 4   -->
+    <property name="maxThreads"><value>8</value></property>
+
     <property name="allowAnonymousAccess"><value>false</value></property>
     <property name="accessControlEnabled"><value>false</value></property>
     <property name="enableNtp"><value>false</value></property>
     <property name="enableKerberos"><value>false</value></property>
     <property name="enableChangePassword"><value>false</value></property>
     <property name="ldapPort"><value>10389</value></property>
+
+    <property name="systemPartitionConfiguration">
+      <ref bean="systemPartitionConfiguration"/>
+    </property>
+
     <property name="contextPartitionConfigurations">
       <set>
         <ref bean="examplePartitionConfiguration"/>
@@ -159,16 +179,149 @@
     </property>
   </bean>
   
-  <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration">
+  <!-- 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="name"><value>system</value></property>
+    <property name="cacheSize"><value>10000</value></property>
+    <property name="suffix"><value>ou=system</value></property>
+
+    <!-- the optimizer is enabled by default but may not always be what     -->
+    <!-- you want if your queries are really simple                         -->
+    <property name="enableOptimizer"><value>true</value></property>
+
+    <!--
+      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>false</value></property>
+    <property name="indexedAttributes">
+      <set>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.1</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.2</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.3</value></property>
+          <property name="cacheSize"><value>1000000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.4</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.5</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.6</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.7</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>ou</value></property>
+          <property name="cacheSize"><value>50000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>uid</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>objectClass</value></property>
+          <property name="cacheSize"><value>100000</value></property>
+        </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="name"><value>example</value></property>
+    <property name="cacheSize"><value>10000</value></property>
     <property name="suffix"><value>dc=example,dc=com</value></property>
+
+    <!-- the optimizer is enabled by default but may not always be what     -->
+    <!-- you want if your queries are really simple                         -->
+    <property name="enableOptimizer"><value>true</value></property>
+
+    <!--
+      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>false</value></property>
     <property name="indexedAttributes">
       <set>
-        <value>dc</value>
-        <value>ou</value>
-        <value>objectClass</value>
-        <value>krb5PrincipalName</value>
-        <value>uid</value>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.1</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.2</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.3</value></property>
+          <property name="cacheSize"><value>1000000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.4</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.5</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.6</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.7</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>dc</value></property>
+          <property name="cacheSize"><value>1000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>ou</value></property>
+          <property name="cacheSize"><value>50000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>krb5PrincipalName</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>uid</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>objectClass</value></property>
+          <property name="cacheSize"><value>100000</value></property>
+        </bean>
       </set>
     </property>
     <property name="contextEntry">

Modified: directory/branches/apacheds/1.0/server-main/src/main/java/org/apache/directory/server/Service.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-main/src/main/java/org/apache/directory/server/Service.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-main/src/main/java/org/apache/directory/server/Service.java (original)
+++ directory/branches/apacheds/1.0/server-main/src/main/java/org/apache/directory/server/Service.java Mon Jul 31 09:27:52 2006
@@ -49,6 +49,7 @@
     private Properties env;
     private Thread workerThread = null;
     private SynchWorker worker = new SynchWorker();
+    private MutableServerStartupConfiguration cfg;
     private boolean startNoWait = false;
 
 
@@ -56,7 +57,6 @@
     {
         printBanner();
         long startTime = System.currentTimeMillis();
-        MutableServerStartupConfiguration cfg;
 
         if ( install != null )
         {
@@ -92,8 +92,11 @@
         env.putAll( cfg.toJndiEnvironment() );
         new InitialDirContext( env );
 
-        workerThread = new Thread( worker, "SynchWorkerThread" );
-
+        if ( cfg.getSynchPeriodMillis() > 0 )
+        {
+            workerThread = new Thread( worker, "SynchWorkerThread" );
+        }
+        
         if ( log.isInfoEnabled() )
         {
             log.info( "server: started in {} milliseconds", ( System.currentTimeMillis() - startTime ) + "" );
@@ -110,23 +113,29 @@
 
     public void start()
     {
-        workerThread.start();
+        if ( workerThread != null )
+        {
+            workerThread.start();
+        }
         return;
     }
 
 
     public void stop( String[] args ) throws Exception
     {
-        worker.stop = true;
-        synchronized ( worker.lock )
+        if ( workerThread != null )
         {
-            worker.lock.notify();
-        }
-
-        while ( startNoWait && workerThread.isAlive() )
-        {
-            log.info( "Waiting for SynchWorkerThread to die." );
-            workerThread.join( 500 );
+            worker.stop = true;
+            synchronized ( worker.lock )
+            {
+                worker.lock.notify();
+            }
+    
+            while ( startNoWait && workerThread.isAlive() )
+            {
+                log.info( "Waiting for SynchWorkerThread to die." );
+                workerThread.join( 500 );
+            }
         }
 
         env.putAll( new ShutdownConfiguration().toJndiEnvironment() );
@@ -138,6 +147,7 @@
     {
     }
 
+    
     class SynchWorker implements Runnable
     {
         Object lock = new Object();
@@ -152,7 +162,7 @@
                 {
                     try
                     {
-                        lock.wait( 20000 );
+                        lock.wait( cfg.getSynchPeriodMillis() );
                     }
                     catch ( InterruptedException e )
                     {

Modified: directory/branches/apacheds/1.0/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryService.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryService.java (original)
+++ directory/branches/apacheds/1.0/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryService.java Mon Jul 31 09:27:52 2006
@@ -20,7 +20,7 @@
 
 import org.apache.directory.server.configuration.MutableServerStartupConfiguration;
 import org.apache.directory.server.core.configuration.Configuration;
-import org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration;
+import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
 import org.apache.directory.server.core.configuration.ShutdownConfiguration;
 import org.apache.directory.server.core.configuration.SyncConfiguration;
 import org.apache.directory.server.jndi.ServerContextFactory;
@@ -303,8 +303,8 @@
         Set indexedAttrs;
         BasicAttribute attr;
         Set pcfgs = new HashSet();
-        MutableDirectoryPartitionConfiguration pcfg;
-        pcfg = new MutableDirectoryPartitionConfiguration();
+        MutablePartitionConfiguration pcfg;
+        pcfg = new MutablePartitionConfiguration();
 
         pcfg.setName( this.customRootPartitionName );
         pcfg.setSuffix( "dc=" + this.customRootPartitionName );

Modified: directory/branches/apacheds/1.0/server-tools/src/main/java/org/apache/directory/server/tools/ApachedsTools.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-tools/src/main/java/org/apache/directory/server/tools/ApachedsTools.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-tools/src/main/java/org/apache/directory/server/tools/ApachedsTools.java (original)
+++ directory/branches/apacheds/1.0/server-tools/src/main/java/org/apache/directory/server/tools/ApachedsTools.java Mon Jul 31 09:27:52 2006
@@ -99,7 +99,7 @@
                 System.out.println( "loading settings from: " + cmd.getLayout().getConfigurationFile() );
             }
             ApplicationContext factory = null;
-            URL configUrl = configUrl = cmd.getLayout().getConfigurationFile().toURL();
+            URL configUrl = cmd.getLayout().getConfigurationFile().toURL();
             factory = new FileSystemXmlApplicationContext( configUrl.toString() );
             cmd.setConfiguration( ( ServerStartupConfiguration ) factory.getBean( "configuration" ) );
         }

Modified: directory/branches/apacheds/1.0/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java (original)
+++ directory/branches/apacheds/1.0/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java Mon Jul 31 09:27:52 2006
@@ -129,7 +129,7 @@
 
         JdbmMasterTable master = new JdbmMasterTable( recMan );
         AttributeType attributeType = bootstrapRegistries.getAttributeTypeRegistry().lookup( "apacheUpdn" );
-        JdbmIndex idIndex = new JdbmIndex( attributeType, partitionDirectory );
+        JdbmIndex idIndex = new JdbmIndex( attributeType, partitionDirectory, 1000 );
 
         out.println( "#---------------------" );
         NamingEnumeration list = master.listTuples();

Modified: directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/BadDnTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/BadDnTest.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/BadDnTest.java (original)
+++ directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/BadDnTest.java Mon Jul 31 09:27:52 2006
@@ -1,17 +1,18 @@
 /*
- * Copyright (c) 2004 Solarsis Group LLC.
+ *   Copyright 2006 The Apache Software Foundation
  *
- * Licensed under the Open Software License, Version 2.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   Licensed 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://opensource.org/licenses/osl-2.1.php
+ *       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.
  *
- * 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.
  */
 package org.apache.directory.server;
 

Modified: directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java (original)
+++ directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java Mon Jul 31 09:27:52 2006
@@ -1,17 +1,18 @@
 /*
- * Copyright (c) 2004 Solarsis Group LLC.
+ *   Copyright 2006 The Apache Software Foundation
  *
- * Licensed under the Open Software License, Version 2.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   Licensed 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://opensource.org/licenses/osl-2.1.php
+ *       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.
  *
- * 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.
  */
 package org.apache.directory.server;
 

Modified: directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/MiscTest.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/MiscTest.java (original)
+++ directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/MiscTest.java Mon Jul 31 09:27:52 2006
@@ -17,7 +17,7 @@
 package org.apache.directory.server;
 
 
-import org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration;
+import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.asn1.util.Asn1StringUtils;
 import org.apache.directory.shared.ldap.message.Control;
@@ -72,7 +72,7 @@
         {
             Set partitions = new HashSet();
             partitions.addAll( configuration.getContextPartitionConfigurations() );
-            MutableDirectoryPartitionConfiguration partition = new MutableDirectoryPartitionConfiguration();
+            MutablePartitionConfiguration partition = new MutablePartitionConfiguration();
             partition.setSuffix( "dc=aPache,dc=org" );
             Attributes entry = new BasicAttributes( "dc", "aPache", true );
             Attribute oc = new BasicAttribute( "objectClass" );
@@ -93,7 +93,7 @@
             // create a partition to search
             Set partitions = new HashSet();
             partitions.addAll( configuration.getContextPartitionConfigurations() );
-            MutableDirectoryPartitionConfiguration partition = new MutableDirectoryPartitionConfiguration();
+            MutablePartitionConfiguration partition = new MutablePartitionConfiguration();
             partition.setSuffix( "dc=apache,dc=org" );
             Attributes entry = new BasicAttributes( "dc", "apache", true );
             Attribute oc = new BasicAttribute( "objectClass" );

Modified: directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java (original)
+++ directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java Mon Jul 31 09:27:52 2006
@@ -1,32 +1,37 @@
 /*
- * Copyright (c) 2004 Solarsis Group LLC.
+ *   Copyright 2006 The Apache Software Foundation
  *
- * Licensed under the Open Software License, Version 2.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   Licensed 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://opensource.org/licenses/osl-2.1.php
+ *       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.
  *
- * 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.
  */
 package org.apache.directory.server;
 
 
 import java.util.Hashtable;
 
+import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.AttributeInUseException;
+import javax.naming.directory.AttributeModificationException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InvalidAttributeIdentifierException;
 import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
 import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
 
@@ -68,7 +73,7 @@
     /**
      * Create context and a person entry.
      */
-    public void setUp() throws Exception
+    protected void setUp() throws Exception
     {
         super.setUp();
 
@@ -93,7 +98,7 @@
     /**
      * Remove person entry and close context.
      */
-    public void tearDown() throws Exception
+    protected void tearDown() throws Exception
     {
         ctx.unbind( RDN );
         ctx.close();
@@ -109,7 +114,6 @@
      */
     public void testAddNewAttributeValue() throws NamingException
     {
-
         // Add telephoneNumber attribute
         String newValue = "1234567890";
         Attributes attrs = new BasicAttributes( "telephoneNumber", newValue );
@@ -131,7 +135,6 @@
      */
     public void testAddNewAttributeValues() throws NamingException
     {
-
         // Add telephoneNumber attribute
         String[] newValues =
             { "1234567890", "999999999" };
@@ -159,7 +162,6 @@
      */
     public void testAddAdditionalAttributeValue() throws NamingException
     {
-
         // A new description attribute value
         String newValue = "A new description for this person";
         assertFalse( newValue.equals( PERSON_DESCRIPTION ) );
@@ -189,9 +191,9 @@
      */
     public void testAddExistingAttributeValue() throws NamingException
     {
-
         // Change description attribute
         Attributes attrs = new BasicAttributes( "description", PERSON_DESCRIPTION );
+        
         try
         {
             ctx.modifyAttributes( RDN, DirContext.ADD_ATTRIBUTE, attrs );
@@ -210,6 +212,83 @@
         assertEquals( 1, attr.size() );
     }
 
+    /**
+     * Try to add an already existing attribute value.
+     * 
+     * Expected behaviour: Modify operation fails with an
+     * AttributeInUseException. Original LDAP Error code: 20 (Indicates that the
+     * attribute value specified in a modify or add operation already exists as
+     * a value for that attribute).
+     * 
+     * Check for bug DIR_SERVER664
+     * 
+     * @throws NamingException
+     */
+    public void testAddExistingNthAttributesDirServer664() throws NamingException
+    {
+        // Change description attribute
+        Attributes attrs = new BasicAttributes( true );
+        attrs.put( new BasicAttribute( "attr1", "attr 1" ) );
+        attrs.put( new BasicAttribute( "attr2", "attr 2" ) );
+        attrs.put( new BasicAttribute( "attr3", "attr 3" ) );
+        attrs.put( new BasicAttribute( "attr4", "attr 4" ) );
+        attrs.put( new BasicAttribute( "attr5", "attr 5" ) );
+        attrs.put( new BasicAttribute( "attr6", "attr 6" ) );
+        attrs.put( new BasicAttribute( "attr7", "attr 7" ) );
+        attrs.put( new BasicAttribute( "attr8", "attr 8" ) );
+        attrs.put( new BasicAttribute( "attr9", "attr 9" ) );
+        attrs.put( new BasicAttribute( "attr10", "attr 10" ) );
+        attrs.put( new BasicAttribute( "attr11", "attr 11" ) );
+        attrs.put( new BasicAttribute( "attr12", "attr 12" ) );
+        attrs.put( new BasicAttribute( "attr13", "attr 13" ) );
+        attrs.put( new BasicAttribute( "attr14", "attr 14" ) );
+        
+        Attribute attr = new BasicAttribute( "description", PERSON_DESCRIPTION );
+
+        attrs.put( attr );
+        
+        try
+        {
+            ctx.modifyAttributes( RDN, DirContext.ADD_ATTRIBUTE, attrs );
+            fail( "Adding an already existing atribute value should fail." );
+        }
+        catch ( AttributeInUseException e )
+        {
+            // expected behaviour
+        }
+
+        // Verify, that attribute is still there, and is the only one
+        attrs = ctx.getAttributes( RDN );
+        attr = attrs.get( "description" );
+        assertNotNull( attr );
+        assertTrue( attr.contains( PERSON_DESCRIPTION ) );
+        assertEquals( 1, attr.size() );
+    }
+
+    /**
+     * Check for DIR_SERVER_643
+     * 
+     * @throws NamingException
+     */
+    public void testTwoDescriptionDirServer643() throws NamingException
+    {
+        // Change description attribute
+        Attributes attrs = new BasicAttributes( true );
+        Attribute attr = new BasicAttribute( "description", "a British singer-songwriter with an expressive four-octave voice" );
+        attr.add( "one of the most influential female artists of the twentieth century" );
+        attrs.put( attr );
+        
+        ctx.modifyAttributes( RDN, DirContext.ADD_ATTRIBUTE, attrs );
+
+        // Verify, that attribute is still there, and is the only one
+        attrs = ctx.getAttributes( RDN );
+        attr = attrs.get( "description" );
+        assertNotNull( attr );
+        assertEquals( 3, attr.size() );
+        assertTrue( attr.contains( "a British singer-songwriter with an expressive four-octave voice" ) );
+        assertTrue( attr.contains( "one of the most influential female artists of the twentieth century" ) );
+        assertTrue( attr.contains( PERSON_DESCRIPTION ) );
+    }
 
     /**
      * Try to add a duplicate attribute value to an entry, where this attribute
@@ -332,4 +411,101 @@
 
         fail( "Cannot reach this point" );
     }
+    
+    
+    /**
+     * Create a person entry and perform a modify op, in which
+     * we modify an attribute two times.
+     */
+    public void testAttributeValueMultiMofificationDIRSERVER_636() throws NamingException {
+
+        // Create a person entry
+        Attributes attrs = getPersonAttributes("Bush", "Kate Bush");
+        String rdn = "cn=Kate Bush";
+        ctx.createSubcontext(rdn, attrs);
+
+        // Add a decsription with two values
+        String[] descriptions = {
+                "Kate Bush is a British singer-songwriter.",
+                "She has become one of the most influential female artists of the twentieth century." };
+        Attribute desc1 = new BasicAttribute("description");
+        desc1.add(descriptions[0]);
+        desc1.add(descriptions[1]);
+
+        ModificationItem addModOp = new ModificationItem(
+                DirContext.ADD_ATTRIBUTE, desc1);
+
+        Attribute desc2 = new BasicAttribute("description");
+        desc2.add(descriptions[1]);
+        ModificationItem delModOp = new ModificationItem(
+                DirContext.REMOVE_ATTRIBUTE, desc2);
+
+        ctx.modifyAttributes(rdn, new ModificationItem[] { addModOp,
+                        delModOp });
+
+        SearchControls sctls = new SearchControls();
+        sctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
+        String filter = "(sn=Bush)";
+        String base = "";
+
+        // Check entry
+        NamingEnumeration enm = ctx.search(base, filter, sctls);
+        assertTrue(enm.hasMore());
+        
+        while (enm.hasMore()) {
+            SearchResult sr = (SearchResult) enm.next();
+            attrs = sr.getAttributes();
+            Attribute desc = sr.getAttributes().get("description");
+            assertNotNull(desc);
+            assertEquals(1, desc.size());
+            assertTrue(desc.contains(descriptions[0]));
+        }
+
+        // Remove the person entry
+        ctx.destroySubcontext(rdn);
+    }
+
+    /**
+     * Create a person entry and perform a modify op on an
+     * attribute which is part of the DN. This is not allowed.
+     * 
+     * A JIRA has been created for this bug : DIRSERVER_687
+     */
+    /*
+     public void testDNAttributeMemberMofificationDIRSERVER_687() throws NamingException {
+
+        // Create a person entry
+        Attributes attrs = getPersonAttributes("Bush", "Kate Bush");
+        String rdn = "cn=Kate Bush";
+        ctx.createSubcontext(rdn, attrs);
+
+        // Try to modify the cn attribute
+        Attribute desc1 = new BasicAttribute( "cn", "Georges Bush" );
+
+        ModificationItem addModOp = new ModificationItem(
+                DirContext.REPLACE_ATTRIBUTE, desc1);
+
+        try
+        {
+            ctx.modifyAttributes( rdn, new ModificationItem[] { addModOp } );
+        }
+        catch ( AttributeModificationException ame )
+        {
+            assertTrue( true );
+            // Remove the person entry
+            ctx.destroySubcontext(rdn);
+        }
+        catch ( NamingException ne ) 
+        {
+            assertTrue( true );
+            // Remove the person entry
+            ctx.destroySubcontext(rdn);
+        }
+
+        // Remove the person entry
+        ctx.destroySubcontext(rdn);
+
+        fail();
+    }
+    */
 }

Modified: directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyRemoveTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyRemoveTest.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyRemoveTest.java (original)
+++ directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/ModifyRemoveTest.java Mon Jul 31 09:27:52 2006
@@ -1,17 +1,18 @@
 /*
- * Copyright (c) 2004 Solarsis Group LLC.
+ *   Copyright 2006 The Apache Software Foundation
  *
- * Licensed under the Open Software License, Version 2.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   Licensed 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://opensource.org/licenses/osl-2.1.php
+ *       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.
  *
- * 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.
  */
 package org.apache.directory.server;
 

Modified: directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/PersistentSearchTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/PersistentSearchTest.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/PersistentSearchTest.java (original)
+++ directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/PersistentSearchTest.java Mon Jul 31 09:27:52 2006
@@ -1,17 +1,18 @@
 /*
- * Copyright (c) 2004 Solarsis Group LLC.
+ *   Copyright 2006 The Apache Software Foundation
  *
- * Licensed under the Open Software License, Version 2.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   Licensed 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://opensource.org/licenses/osl-2.1.php
+ *       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.
  *
- * 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.
  */
 package org.apache.directory.server;
 

Modified: directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/SearchTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/SearchTest.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/SearchTest.java (original)
+++ directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/SearchTest.java Mon Jul 31 09:27:52 2006
@@ -1,17 +1,18 @@
 /*
- * Copyright (c) 2004 Solarsis Group LLC.
+ *   Copyright 2006 The Apache Software Foundation
  *
- * Licensed under the Open Software License, Version 2.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   Licensed 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://opensource.org/licenses/osl-2.1.php
+ *       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.
  *
- * 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.
  */
 package org.apache.directory.server;
 
@@ -25,6 +26,7 @@
 import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
 import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
 
@@ -90,6 +92,7 @@
         attributes = this.getPersonAttributes( "Jagger", "Rolling-Stones" );
         attributes.put( "description", "an English singer-songwriter" );
         ctx.createSubcontext( RDN2, attributes );
+        
     }
 
 
@@ -191,4 +194,34 @@
         results = ctx.search( RDN2, "(cn=*ri*os)", ctls );
         assertFalse( results.hasMore() );
     }
+    
+    /**
+     * Search operation with a base DN with quotes
+     */
+    public void testSearchWithQuotesInBase() throws NamingException {
+
+        SearchControls sctls = new SearchControls();
+        sctls.setSearchScope(SearchControls.OBJECT_SCOPE);
+        String filter = "(cn=Tori Amos)";
+
+        // sn="Kylie Minogue" (with quotes)
+        String base = "cn=\"Tori Amos\"";
+
+        try {
+            // Check entry
+            NamingEnumeration enm = ctx.search( base, filter, sctls );
+            assertTrue( enm.hasMore() );
+            
+            while ( enm.hasMore() ) {
+                SearchResult sr = (SearchResult) enm.next();
+                Attributes attrs = sr.getAttributes();
+                Attribute sn = attrs.get("sn");
+                assertNotNull(sn);
+                assertTrue( sn.contains( "Amos" ) );
+            }
+        } catch (Exception e) {
+            fail( e.getMessage() );
+        }
+    }
+    
 }

Modified: directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java?rev=427156&r1=427155&r2=427156&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java (original)
+++ directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java Mon Jul 31 09:27:52 2006
@@ -30,7 +30,7 @@
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 
-import org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration;
+import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 
@@ -54,10 +54,10 @@
         Set indexedAttrs;
         Set pcfgs = new HashSet();
 
-        MutableDirectoryPartitionConfiguration pcfg;
+        MutablePartitionConfiguration pcfg;
 
         // Add partition 'testing'
-        pcfg = new MutableDirectoryPartitionConfiguration();
+        pcfg = new MutablePartitionConfiguration();
         pcfg.setName( "testing" );
         pcfg.setSuffix( "ou=testing" );
 
@@ -80,7 +80,7 @@
         pcfgs.add( pcfg );
 
         // Add partition 'example'
-        pcfg = new MutableDirectoryPartitionConfiguration();
+        pcfg = new MutablePartitionConfiguration();
         pcfg.setName( "example" );
         pcfg.setSuffix( "dc=example" );
 
@@ -104,7 +104,7 @@
         pcfgs.add( pcfg );
 
         // Add partition 'MixedCase'
-        pcfg = new MutableDirectoryPartitionConfiguration();
+        pcfg = new MutablePartitionConfiguration();
         pcfg.setName( "mixedcase" );
         pcfg.setSuffix( "dc=MixedCase" );
 
@@ -280,10 +280,10 @@
     
     public void testBadPartition() throws Exception
     {
-        MutableDirectoryPartitionConfiguration pcfg;
+        MutablePartitionConfiguration pcfg;
 
         // Add partition 'test=testing'
-        pcfg = new MutableDirectoryPartitionConfiguration();
+        pcfg = new MutablePartitionConfiguration();
         pcfg.setName( "testing" );
         
         try