directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1029084 [1/2] - in /directory/apacheds/trunk: all/ core-annotations/ core-annotations/src/main/java/org/apache/directory/server/core/factory/ core-annotations/src/test/java/org/apache/directory/server/core/factory/ core-api/ core-api/src/m...
Date Sat, 30 Oct 2010 14:35:58 GMT
Author: elecharny
Date: Sat Oct 30 14:35:55 2010
New Revision: 1029084

URL: http://svn.apache.org/viewvc?rev=1029084&view=rev
Log:
merged back the config branch into trunk

Added:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/AbstractLayout.java
      - copied unchanged from r1029077, directory/apacheds/branches/apacheds-config/core-api/src/main/java/org/apache/directory/server/core/AbstractLayout.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/InstanceLayout.java
      - copied unchanged from r1029077, directory/apacheds/branches/apacheds-config/core-api/src/main/java/org/apache/directory/server/core/InstanceLayout.java
    directory/apacheds/trunk/jdbm-partition/conf/
      - copied from r1029077, directory/apacheds/branches/apacheds-config/jdbm-partition/conf/
    directory/apacheds/trunk/jdbm-partition/log/
      - copied from r1029077, directory/apacheds/branches/apacheds-config/jdbm-partition/log/
    directory/apacheds/trunk/jdbm-partition/partitions/
      - copied from r1029077, directory/apacheds/branches/apacheds-config/jdbm-partition/partitions/
    directory/apacheds/trunk/jdbm-partition/run/
      - copied from r1029077, directory/apacheds/branches/apacheds-config/jdbm-partition/run/
Removed:
    directory/apacheds/trunk/service/src/main/java/org/apache/directory/server/AbstractLayout.java
    directory/apacheds/trunk/service/src/main/java/org/apache/directory/server/InstanceLayout.java
Modified:
    directory/apacheds/trunk/all/   (props changed)
    directory/apacheds/trunk/core/   (props changed)
    directory/apacheds/trunk/core-annotations/   (props changed)
    directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
    directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
    directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceAnnotationTest.java
    directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceFactoryTest.java
    directory/apacheds/trunk/core-api/   (props changed)
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CacheService.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/DirectoryService.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java   (props changed)
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
    directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockDirectoryService.java
    directory/apacheds/trunk/core-avl/   (props changed)
    directory/apacheds/trunk/core-constants/   (props changed)
    directory/apacheds/trunk/core-integ/   (props changed)
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java   (props changed)
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java
    directory/apacheds/trunk/core-jndi/   (props changed)
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
    directory/apacheds/trunk/http-integration/   (props changed)
    directory/apacheds/trunk/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java
    directory/apacheds/trunk/i18n/   (props changed)
    directory/apacheds/trunk/installers/   (props changed)
    directory/apacheds/trunk/installers-maven-plugin/   (props changed)
    directory/apacheds/trunk/interceptor-kerberos/   (props changed)
    directory/apacheds/trunk/jdbm/   (props changed)
    directory/apacheds/trunk/jdbm-partition/   (props changed)
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndex.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/   (props changed)
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java   (props changed)
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/   (props changed)
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java   (contents, props changed)
    directory/apacheds/trunk/kerberos-shared/   (props changed)
    directory/apacheds/trunk/kerberos-test/   (props changed)
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
    directory/apacheds/trunk/ldif-partition/   (props changed)
    directory/apacheds/trunk/protocol-changepw/   (props changed)
    directory/apacheds/trunk/protocol-dhcp/   (props changed)
    directory/apacheds/trunk/protocol-dns/   (props changed)
    directory/apacheds/trunk/protocol-kerberos/   (props changed)
    directory/apacheds/trunk/protocol-ldap/   (props changed)
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java   (contents, props changed)
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
    directory/apacheds/trunk/protocol-ntp/   (props changed)
    directory/apacheds/trunk/protocol-shared/   (props changed)
    directory/apacheds/trunk/server-annotations/   (props changed)
    directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
    directory/apacheds/trunk/server-integ/   (props changed)
    directory/apacheds/trunk/server-jndi/   (props changed)
    directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
    directory/apacheds/trunk/server-replication/   (props changed)
    directory/apacheds/trunk/server-tools/   (props changed)
    directory/apacheds/trunk/service/   (props changed)
    directory/apacheds/trunk/service/src/main/java/org/apache/directory/server/ApacheDsService.java
    directory/apacheds/trunk/service/src/main/java/org/apache/directory/server/InstallationLayout.java
    directory/apacheds/trunk/service/src/main/java/org/apache/directory/server/UberjarMain.java
    directory/apacheds/trunk/test-framework/   (props changed)
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
    directory/apacheds/trunk/wrapper/   (props changed)
    directory/apacheds/trunk/wrapper/src/main/java/org/apache/directory/server/ApacheDsTanukiWrapper.java
    directory/apacheds/trunk/xdbm-partition/   (props changed)
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Index.java
    directory/apacheds/trunk/xdbm-tools/   (props changed)

Propchange: directory/apacheds/trunk/all/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/all:982369-987590
+/directory/apacheds/branches/apacheds-config/all:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/all:980138-980938

Propchange: directory/apacheds/trunk/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/core:982369-987590
+/directory/apacheds/branches/apacheds-config/core:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core:980138-980934

Propchange: directory/apacheds/trunk/core-annotations/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/core-annotations:982369-987590
+/directory/apacheds/branches/apacheds-config/core-annotations:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-annotations:980138-980934

Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java Sat Oct 30 14:35:55 2010
@@ -95,7 +95,7 @@ public class DSAnnotationProcessor
                 // We use the partition factory to create partition and index instances.
                 PartitionFactory partitionFactory = dsf.getPartitionFactory();
                 partition = partitionFactory.createPartition( createPartition.name(), createPartition.suffix(),
-                    createPartition.cacheSize(), new File( service.getWorkingDirectory(), createPartition.name() ) );
+                    createPartition.cacheSize(), new File( service.getInstanceLayout().getPartitionsDirectory(), createPartition.name() ) );
 
                 CreateIndex[] indexes = createPartition.indexes();
                 for ( CreateIndex createIndex : indexes )
@@ -114,7 +114,7 @@ public class DSAnnotationProcessor
                 {
                     BTreePartition<?> btreePartition = ( BTreePartition<?> ) partition;
                     btreePartition.setCacheSize( createPartition.cacheSize() );
-                    btreePartition.setPartitionDir( new File( service.getWorkingDirectory(), createPartition.name() ) );
+                    btreePartition.setPartitionDir( new File( service.getInstanceLayout().getPartitionsDirectory(), createPartition.name() ) );
 
                     // Process the indexes if any
                     CreateIndex[] indexes = createPartition.indexes();

Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java Sat Oct 30 14:35:55 2010
@@ -22,10 +22,10 @@ package org.apache.directory.server.core
 import java.io.File;
 import java.util.List;
 
-import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.InstanceLayout;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.ldif.LdifPartition;
 import org.apache.directory.server.core.schema.SchemaPartition;
@@ -120,16 +120,17 @@ public class DefaultDirectoryServiceFact
     /**
      * Build the working directory
      */
-    private void buildWorkingDirectory( String name )
+    private void buildInstanceDirectory( String name )
     {
-        String workingDirectory = System.getProperty( "workingDirectory" );
+        String instanceDirectory = System.getProperty( "workingDirectory" );
 
-        if ( workingDirectory == null )
+        if ( instanceDirectory == null )
         {
-            workingDirectory = System.getProperty( "java.io.tmpdir" ) + "/server-work-" + name;
+            instanceDirectory = System.getProperty( "java.io.tmpdir" ) + "/server-work-" + name;
         }
 
-        directoryService.setWorkingDirectory( new File( workingDirectory ) );
+        InstanceLayout instanceLayout = new InstanceLayout( instanceDirectory );
+        directoryService.setInstanceLayout( instanceLayout );
     }
 
 
@@ -142,7 +143,7 @@ public class DefaultDirectoryServiceFact
 
         // Init the LdifPartition
         LdifPartition ldifPartition = new LdifPartition();
-        String workingDirectory = directoryService.getWorkingDirectory().getPath();
+        String workingDirectory = directoryService.getInstanceLayout().getPartitionsDirectory().getPath();
         ldifPartition.setWorkingDirectory( workingDirectory + "/schema" );
 
         // Extract the schema on disk (a brand new one) and load the registries
@@ -185,7 +186,7 @@ public class DefaultDirectoryServiceFact
 
         // Inject the System Partition
         Partition systemPartition = partitionFactory.createPartition( "system", ServerDNConstants.SYSTEM_DN, 500,
-            new File( directoryService.getWorkingDirectory(), "system" ) );
+            new File( directoryService.getInstanceLayout().getPartitionsDirectory(), "system" ) );
         systemPartition.setSchemaManager( directoryService.getSchemaManager() );
 
         partitionFactory.addIndex( systemPartition, SchemaConstants.OBJECT_CLASS_AT, 100 );
@@ -202,14 +203,11 @@ public class DefaultDirectoryServiceFact
     private void build( String name ) throws Exception
     {
         directoryService.setInstanceId( name );
-        buildWorkingDirectory( name );
+        buildInstanceDirectory( name );
 
         // Erase the working directory to be sure that we don't have some
         // remaining data from a previous run
-        String workingDirectoryPath = directoryService.getWorkingDirectory().getPath();
-        File workingDirectory = new File( workingDirectoryPath );
-
-        FileUtils.deleteDirectory( workingDirectory );
+        String workingDirectoryPath = directoryService.getInstanceLayout().getInstanceDirectory().getPath();
 
         // Init the service now
         initSchema();

Modified: directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceAnnotationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceAnnotationTest.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceAnnotationTest.java (original)
+++ directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceAnnotationTest.java Sat Oct 30 14:35:55 2010
@@ -55,7 +55,7 @@ public class DirectoryServiceAnnotationT
         assertEquals( "classDS", service.getInstanceId() );
         
         service.shutdown();
-        FileUtils.deleteDirectory( service.getWorkingDirectory() );
+        FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
     }
 
 
@@ -69,7 +69,7 @@ public class DirectoryServiceAnnotationT
         assertEquals( "methodDS", service.getInstanceId() );
         
         service.shutdown();
-        FileUtils.deleteDirectory( service.getWorkingDirectory() );
+        FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
     }
     
     
@@ -126,7 +126,7 @@ public class DirectoryServiceAnnotationT
         }
         
         service.shutdown();
-        FileUtils.deleteDirectory( service.getWorkingDirectory() );
+        FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
     }
     
     
@@ -172,7 +172,7 @@ public class DirectoryServiceAnnotationT
         }
 
         service.shutdown();
-        FileUtils.deleteDirectory( service.getWorkingDirectory() );
+        FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
     }
 
 }

Modified: directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceFactoryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceFactoryTest.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceFactoryTest.java (original)
+++ directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceFactoryTest.java Sat Oct 30 14:35:55 2010
@@ -50,6 +50,6 @@ public class DirectoryServiceFactoryTest
         assertTrue( service.isStarted() );
         
         service.shutdown();
-        FileUtils.deleteDirectory( service.getWorkingDirectory() );
+        FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
     }
 }

Propchange: directory/apacheds/trunk/core-api/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/core-api:982369-987590
+/directory/apacheds/branches/apacheds-config/core-api:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-api:980138-980934

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CacheService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CacheService.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CacheService.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CacheService.java Sat Oct 30 14:35:55 2010
@@ -65,7 +65,7 @@ public class CacheService
             return;
         }
 
-        File configFile = new File( dirService.getWorkingDirectory(), DIRECTORY_CACHESERVICE_XML );
+        File configFile = new File( dirService.getInstanceLayout().getConfDirectory(), DIRECTORY_CACHESERVICE_XML );
 
         if ( !configFile.exists() )
         {

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/DirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/DirectoryService.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/DirectoryService.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/DirectoryService.java Sat Oct 30 14:35:55 2010
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core;
 
 
-import java.io.File;
 import java.util.List;
 import java.util.Set;
 
@@ -339,21 +338,18 @@ public interface DirectoryService extend
 
 
     /**
-     * Returns working directory (counterpart of <tt>var/lib</tt>) where partitions are
-     * stored by default.
+     * Returns the instance layout which contains the path for various directories
      *
-     * @return the directory where partition's are stored.
+     * @return the InstanceLayout for this directory service.
      */
-    File getWorkingDirectory();
-
+    InstanceLayout getInstanceLayout();
 
+    
     /**
-     * Sets working directory (counterpart of <tt>var/lib</tt>) where partitions are stored
-     * by default.
-     *
-     * @param workingDirectory the directory where the server's partitions are stored by default.
+     * Sets the InstanceLayout used by the DirectoryService to store the files
+     * @param instanceLayout The InstanceLayout to set
      */
-    void setWorkingDirectory( File workingDirectory );
+    void setInstanceLayout( InstanceLayout instanceLayout );
 
 
     /**

Propchange: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,4 +1,5 @@
 /directory/apacheds/branches/apacheds-codec-merge/core/src/main/java/org/apache/directory/server/core/authn/PasswordPolicyConfiguration.java:982369-987590
+/directory/apacheds/branches/apacheds-config/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/authn/PasswordPolicyConfiguration.java:980138-980934
 /directory/apacheds/branches/apacheds-replication/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyConfiguration.java:749790-764110
 /directory/apacheds/branches/apacheds-schema/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyConfiguration.java:806623-896441

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java Sat Oct 30 14:35:55 2010
@@ -25,6 +25,7 @@ import javax.naming.InvalidNameException
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapOtherException;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -44,6 +45,9 @@ public abstract class AbstractPartition 
 
     /** The SchemaManager instance */
     protected SchemaManager schemaManager;
+    
+    /** The partition ContextEntry */
+    protected Entry contextEntry;
 
     protected AbstractPartition()
     {
@@ -178,4 +182,22 @@ public abstract class AbstractPartition 
     {
         return schemaManager;
     }
+    
+    
+    /**
+     * @return the contextEntry
+     */
+    public Entry getContextEntry()
+    {
+        return contextEntry;
+    }
+
+
+    /**
+     * @param contextEntry the contextEntry to set
+     */
+    public void setContextEntry( Entry contextEntry )
+    {
+        this.contextEntry = contextEntry;
+    }
 }

Modified: directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockDirectoryService.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockDirectoryService.java (original)
+++ directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockDirectoryService.java Sat Oct 30 14:35:55 2010
@@ -252,11 +252,6 @@ public class MockDirectoryService implem
     }
 
 
-    public void setWorkingDirectory( File workingDirectory )
-    {
-    }
-
-
     public void validate()
     {
     }
@@ -525,6 +520,17 @@ public class MockDirectoryService implem
     }
 
 
+    public InstanceLayout getInstanceLayout()
+    {
+        return null;
+    }
+
+
+    public void setInstanceLayout( InstanceLayout instanceLayout )
+    {
+    }
+
+
     /**
      * {@inheritDoc}
      */
@@ -549,6 +555,4 @@ public class MockDirectoryService implem
     public void setPwdPolicies( PpolicyConfigContainer policyContainer )
     {
     }
-    
-    
 }

Propchange: directory/apacheds/trunk/core-avl/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/core-avl:982369-987590
+/directory/apacheds/branches/apacheds-config/core-avl:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-avl:980138-980934

Propchange: directory/apacheds/trunk/core-constants/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/core-constants:982369-987590
+/directory/apacheds/branches/apacheds-config/core-constants:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-constants:980138-980934

Propchange: directory/apacheds/trunk/core-integ/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/core-integ:982369-987590
+/directory/apacheds/branches/apacheds-config/core-integ:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ:980138-980934

Propchange: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,4 +1,5 @@
 /directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:982369-987590
+/directory/apacheds/branches/apacheds-config/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:980138-980934
 /directory/apacheds/branches/apacheds-replication/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:749790-764110
 /directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:806623-896441

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java Sat Oct 30 14:35:55 2010
@@ -55,7 +55,7 @@ public class PartitionConfigurationIT ex
     {
         PartitionFactory partitionFactory = DefaultDirectoryServiceFactory.DEFAULT.getPartitionFactory();
         Partition partition = partitionFactory.createPartition( "removable", "ou=removable", 100, service
-            .getWorkingDirectory() );
+            .getInstanceLayout().getPartitionsDirectory() );
 
         // Test AddContextPartition
         service.addPartition( partition );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java Sat Oct 30 14:35:55 2010
@@ -39,7 +39,7 @@ public abstract class AbstractMetaSchema
     @Before
     public final void init()
     {
-        workingDir = service.getWorkingDirectory().getAbsolutePath();
+        workingDir = service.getInstanceLayout().getPartitionsDirectory().getAbsolutePath();
     }
 
 

Propchange: directory/apacheds/trunk/core-jndi/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/core-jndi:982369-987590
+/directory/apacheds/branches/apacheds-config/core-jndi:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-jndi:980138-980935

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Sat Oct 30 14:35:55 2010
@@ -198,8 +198,8 @@ public class DefaultDirectoryService imp
     /** The instance Id */
     private String instanceId;
 
-    /** The server working directory */
-    private File workingDirectory = new File( "server-work" );
+    /** The server directory layout*/
+    private InstanceLayout instanceLayout;
 
     /**
      * A flag used to shutdown the VM when stopping the server. Useful
@@ -502,26 +502,46 @@ public class DefaultDirectoryService imp
 
 
     /**
-     * Returns working directory (counterpart of <tt>var/lib</tt>) where partitions are
-     * stored by default.
-     *
-     * @return the directory where partition's are stored.
+     * {@inheritDoc}
      */
-    public File getWorkingDirectory()
+    public InstanceLayout getInstanceLayout()
     {
-        return workingDirectory;
+        return instanceLayout;
     }
 
 
     /**
-     * Sets working directory (counterpart of <tt>var/lib</tt>) where partitions are stored
-     * by default.
-     *
-     * @param workingDirectory the directory where the server's partitions are stored by default.
+     * {@inheritDoc}
      */
-    public void setWorkingDirectory( File workingDirectory )
+    public void setInstanceLayout( InstanceLayout instanceLayout )
     {
-        this.workingDirectory = workingDirectory;
+        this.instanceLayout = instanceLayout;
+        
+        // Create the directories if they are missing
+        if ( !instanceLayout.getInstanceDirectory().exists() )
+        {
+            instanceLayout.getInstanceDirectory().mkdirs();
+        }
+
+        if ( !instanceLayout.getLogDirectory().exists() )
+        {
+            instanceLayout.getLogDirectory().mkdirs();
+        }
+        
+        if ( !instanceLayout.getRunDirectory().exists() )
+        {
+            instanceLayout.getRunDirectory().mkdirs();
+        }
+        
+        if ( !instanceLayout.getPartitionsDirectory().exists() )
+        {
+            instanceLayout.getPartitionsDirectory().mkdirs();
+        }
+        
+        if ( !instanceLayout.getConfDirectory().exists() )
+        {
+            instanceLayout.getConfDirectory().mkdirs();
+        }
     }
 
 
@@ -1777,7 +1797,7 @@ public class DefaultDirectoryService imp
 
         try
         {
-            lockFile = new RandomAccessFile( workingDirectory.getAbsolutePath() + File.separator + LOCK_FILE_NAME, "rw" );
+            lockFile = new RandomAccessFile( new File( instanceLayout.getInstanceDirectory(), LOCK_FILE_NAME ), "rw" );
             try
             {
                 fileLock = lockFile.getChannel().tryLock( 0, 1, false );
@@ -1800,7 +1820,7 @@ public class DefaultDirectoryService imp
 
         if ( ( fileLock == null ) || ( !fileLock.isValid() ) )
         {
-            String message = "the working directory " + workingDirectory + " has been locked by another directory service.";
+            String message = "the working directory " + instanceLayout.getRunDirectory() + " has been locked by another directory service.";
             LOG.error( message );
             throw new RuntimeException( message );
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java Sat Oct 30 14:35:55 2010
@@ -117,7 +117,7 @@ public class MemoryChangeLogStore implem
 
     public void init( DirectoryService service ) throws Exception
     {
-        workingDirectory = service.getWorkingDirectory();
+        workingDirectory = service.getInstanceLayout().getLogDirectory();
         loadRevision();
         loadTags();
         loadChangeLog();

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournalStore.java Sat Oct 30 14:35:55 2010
@@ -70,7 +70,7 @@ public class DefaultJournalStore impleme
     {
         if ( workingDirectory == null )
         {
-            workingDirectory = service.getWorkingDirectory();
+            workingDirectory = service.getInstanceLayout().getLogDirectory();
         }
 
         /** Load or create the journal file */

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Sat Oct 30 14:35:55 2010
@@ -38,9 +38,7 @@ import javax.naming.directory.SearchCont
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DNFactory;
-import org.apache.directory.server.core.DefaultCoreSession;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.BaseEntryFilteringCursor;
 import org.apache.directory.server.core.filtering.CursorList;
@@ -72,7 +70,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.controls.pagedSearch.PagedResultsControl;
 import org.apache.directory.shared.ldap.codec.search.controls.persistentSearch.PersistentSearchControl;
 import org.apache.directory.shared.ldap.codec.search.controls.subentries.SubentriesControl;
-import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.cursor.EmptyCursor;
 import org.apache.directory.shared.ldap.cursor.SingletonCursor;
@@ -294,6 +291,7 @@ public class DefaultPartitionNexus exten
             // TODO : we have to deal with this case !
         }
 
+        system.setSchemaManager( schemaManager );
         system.initialize();
 
         // Add root context entry for system partition

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java Sat Oct 30 14:35:55 2010
@@ -102,7 +102,8 @@ public class SchemaServiceTest
         String[] expectedNames = new String[]
             { "sn", "generationQualifier", "ou", "c", "o", "l", "c-st", "givenName", "title", "cn", "initials",
                 "dmdName", "c-ou", "c-o", "apacheExistence", "st", "c-l", "ads-serverId", "ads-indexAttributeId",
-                "ads-transportId", "ads-directoryServiceId", "ads-Id", "ads-extendedOpId" };
+                "ads-transportId", "ads-directoryServiceId", "ads-Id", "ads-extendedOpId", "ads-pwdId", 
+                "ads-compositeElement", "ads-replConsumerId", "ads-journalId", "ads-changeLogId", "ads-replProviderId" };
 
         for ( String name : expectedNames )
         {

Propchange: directory/apacheds/trunk/http-integration/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/http-integration:982369-987590
+/directory/apacheds/branches/apacheds-config/http-integration:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/http-integration:980138-980935

Modified: directory/apacheds/trunk/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java (original)
+++ directory/apacheds/trunk/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java Sat Oct 30 14:35:55 2010
@@ -159,7 +159,7 @@ public class HttpServer
 
             // add web apps from the webapps directory inside directory service's working directory
             // the exploded or archived wars
-            File webAppDir = new File( dirService.getWorkingDirectory(), "webapps" );
+            File webAppDir = new File( dirService.getInstanceLayout().getInstanceDirectory(), "webapps" );
             
             FilenameFilter webAppFilter = new FilenameFilter()
             {

Propchange: directory/apacheds/trunk/i18n/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/i18n:982369-987590
+/directory/apacheds/branches/apacheds-config/i18n:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/i18n:980138-980935

Propchange: directory/apacheds/trunk/installers/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1 +1,2 @@
+/directory/apacheds/branches/apacheds-config/installers:1023442-1029077
 /directory/installers/branches/installers-schema/apacheds:806631-896441

Propchange: directory/apacheds/trunk/installers-maven-plugin/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1 +1,2 @@
+/directory/apacheds/branches/apacheds-config/installers-maven-plugin:1023442-1029077
 /directory/daemon/branches/daemon-schema/plugin:806630-896441

Propchange: directory/apacheds/trunk/interceptor-kerberos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/interceptor-kerberos:982369-987590
+/directory/apacheds/branches/apacheds-config/interceptor-kerberos:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/interceptor-kerberos:980138-980935

Propchange: directory/apacheds/trunk/jdbm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/jdbm:982369-987590
+/directory/apacheds/branches/apacheds-config/jdbm:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm:980138-980935

Propchange: directory/apacheds/trunk/jdbm-partition/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/jdbm-partition:982369-987590
+/directory/apacheds/branches/apacheds-config/jdbm-partition:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition:980138-980935

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java Sat Oct 30 14:35:55 2010
@@ -49,7 +49,7 @@ import org.slf4j.LoggerFactory;
 
 
 /** 
- * A Jdbm based index implementation.
+ * A Jdbm based index implementation. It creates an Index for a give AttributeType.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -140,13 +140,18 @@ public class JdbmIndex<K, O> implements 
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
     // ----------------------------------------------------------------------
-
+    /**
+     * Creates a JdbmIndex instance.
+     */
     public JdbmIndex()
     {
         initialized = false;
     }
 
 
+    /**
+     * Creates a JdbmIndex instance for a give AttributeId
+     */
     public JdbmIndex( String attributeId )
     {
         initialized = false;
@@ -154,9 +159,19 @@ public class JdbmIndex<K, O> implements 
     }
 
 
-    public void init( SchemaManager schemaManager, AttributeType attributeType, File wkDirPath ) throws IOException
+    /**
+     * Initialize the index for an Attribute, with a specific working directory (may be null).
+     * 
+     * @param schemaManager The schemaManager to use to get back the Attribute
+     * @param attributeType The attributeType this index is created for
+     * @param wkDirPath The bas directory where the index files will be created
+     * @throws IOException If the initialization failed
+     */
+    public void init( SchemaManager schemaManager, AttributeType attributeType ) throws IOException
     {
         LOG.debug( "Initializing an Index for attribute '{}'", attributeType.getName() );
+        
+        //.out.println( "IDX Initializing index for AT " + attributeType.getOid() + ", wkDirPath : " + wkDirPath + ", base dir : " + this.wkDirPath );
 
         keyCache = new SynchronizedLRUMap( cacheSize );
         attribute = attributeType;
@@ -168,11 +183,15 @@ public class JdbmIndex<K, O> implements 
 
         if ( this.wkDirPath == null )
         {
-            this.wkDirPath = wkDirPath;
+            NullPointerException e = new NullPointerException( "The index working directory has not be set" );
+            
+            e.printStackTrace();
+            throw e;
         }
 
-        File file = new File( this.wkDirPath.getPath() + File.separator + attribute.getOid() );
-        String path = file.getAbsolutePath();
+        String path = new File( this.wkDirPath, attributeType.getOid() ).getAbsolutePath();
+        //.out.println( "IDX Created index " + path );
+
         BaseRecordManager base = new BaseRecordManager( path );
         base.disableTransactions();
         this.recMan = new CacheRecordManager( base, new MRU( cacheSize ) );
@@ -189,7 +208,7 @@ public class JdbmIndex<K, O> implements 
         }
 
         // finally write a text file in the format <OID>-<attribute-name>.txt
-        FileWriter fw = new FileWriter( new File( this.wkDirPath.getPath() + File.separator + attribute.getOid() + "-" + attribute.getName() + ".txt" ) );
+        FileWriter fw = new FileWriter( new File( path + "-" + attribute.getName() + ".txt" ) );
         // write the AttributeType description
         fw.write( attribute.toString() );
         fw.close();
@@ -363,6 +382,7 @@ public class JdbmIndex<K, O> implements 
      */
     public void setWkDirPath( File wkDirPath )
     {
+        //.out.println( "IDX Defining a WorkingDir : " + wkDirPath );
         protect( "wkDirPath" );
         this.wkDirPath = wkDirPath;
     }

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Sat Oct 30 14:35:55 2010
@@ -80,10 +80,12 @@ public class JdbmPartition extends Abstr
         for ( Index<?, Entry, Long> index : getIndexedAttributes() )
         {
             String oid = schemaManager.getAttributeTypeRegistry().getOidByName( index.getAttributeId() );
+            
             if ( !index.getAttributeId().equals( oid ) )
             {
                 index.setAttributeId( oid );
             }
+            
             store.addIndex( index );
         }
 

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndex.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndex.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndex.java Sat Oct 30 14:35:55 2010
@@ -25,6 +25,8 @@ import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 
+import javax.naming.NamingException;
+
 import jdbm.helper.MRU;
 import jdbm.recman.BaseRecordManager;
 import jdbm.recman.CacheRecordManager;
@@ -66,9 +68,12 @@ public class JdbmRdnIndex<E> extends Jdb
     }
 
 
-    public void init( SchemaManager schemaManager, AttributeType attributeType, File wkDirPath ) throws IOException
+    public void init( SchemaManager schemaManager, AttributeType attributeType ) throws IOException
     {
         LOG.debug( "Initializing an Index for attribute '{}'", attributeType.getName() );
+        
+        //System.out.println( "IDX Initializing RDNindex for AT " + attributeType.getOid() + ", wkDirPath : " + wkDirPath + ", base dir : " + this.wkDirPath );
+
         keyCache = new SynchronizedLRUMap( cacheSize );
         attribute = attributeType;
 
@@ -76,14 +81,18 @@ public class JdbmRdnIndex<E> extends Jdb
         {
             setAttributeId( attribute.getName() );
         }
-
+        
         if ( this.wkDirPath == null )
         {
-            this.wkDirPath = wkDirPath;
+            NullPointerException e = new NullPointerException( "The index working directory has not be set" );
+            
+            e.printStackTrace();
+            throw e;
         }
-
-        File file = new File( this.wkDirPath.getPath() + File.separator + attribute.getOid() );
-        String path = file.getAbsolutePath();
+        
+        String path = new File( this.wkDirPath, attributeType.getOid() ).getAbsolutePath();
+        
+        //System.out.println( "IDX Created index " + path );
         BaseRecordManager base = new BaseRecordManager( path );
         base.disableTransactions();
         this.recMan = new CacheRecordManager( base, new MRU( cacheSize ) );
@@ -100,7 +109,7 @@ public class JdbmRdnIndex<E> extends Jdb
         }
 
         // finally write a text file in the format <OID>-<attribute-name>.txt
-        FileWriter fw = new FileWriter( new File( this.wkDirPath.getPath() + File.separator + attribute.getOid() + "-" + attribute.getName() + ".txt" ) );
+        FileWriter fw = new FileWriter( new File( path + "-" + attribute.getName() + ".txt" ) );
         // write the AttributeType description
         fw.write( attribute.toString() );
         fw.close();

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java Sat Oct 30 14:35:55 2010
@@ -302,6 +302,11 @@ public class JdbmStore<E> extends Abstra
         else if ( index instanceof JdbmIndex<?, ?> )
         {
             jdbmIndex = ( JdbmIndex<?, E> ) index;
+            
+            if ( jdbmIndex.getWkDirPath() == null )
+            {
+                jdbmIndex.setWkDirPath( partitionDir );
+            }
         }
         else
         {
@@ -313,8 +318,7 @@ public class JdbmStore<E> extends Abstra
             jdbmIndex.setWkDirPath( index.getWkDirPath() );
         }
 
-        jdbmIndex.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( index.getAttributeId() ),
-            partitionDir );
+        jdbmIndex.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( index.getAttributeId() ) );
 
         return jdbmIndex;
     }

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java Sat Oct 30 14:35:55 2010
@@ -124,6 +124,7 @@ public class JdbmIndexTest
 
             // created by TransactionManager, if transactions are not disabled
             File logFile = new File( idx.getWkDirPath(), idx.getAttribute().getOid() + ".lg" );
+            
             if ( logFile.exists() )
             {
                 assertTrue( logFile.delete() );
@@ -136,7 +137,9 @@ public class JdbmIndexTest
 
     void initIndex() throws Exception
     {
-        initIndex( new JdbmIndex<String, Entry>() );
+        JdbmIndex<String, Entry> index = new JdbmIndex<String, Entry>();
+        index.setWkDirPath( dbFileDir );
+        initIndex( index );
     }
 
 
@@ -146,8 +149,10 @@ public class JdbmIndexTest
         {
             jdbmIdx = new JdbmIndex<String, Entry>();
         }
+        
+        AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OU_AT );
 
-        jdbmIdx.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OU_AT ), dbFileDir );
+        jdbmIdx.init( schemaManager, attributeType );
         this.idx = jdbmIdx;
     }
 
@@ -181,7 +186,9 @@ public class JdbmIndexTest
         assertEquals( "ou", idx.getAttributeId() );
 
         destroyIndex();
-        initIndex( new JdbmIndex<String, Entry>( "foo" ) );
+        JdbmIndex<String, Entry> index = new JdbmIndex<String, Entry>( "foo" );
+        index.setWkDirPath( dbFileDir );
+        initIndex( index );
         assertEquals( "foo", idx.getAttributeId() );
     }
 
@@ -211,26 +218,29 @@ public class JdbmIndexTest
     @Test
     public void testWkDirPath() throws Exception
     {
+        File wkdir = new File( dbFileDir, "foo" );
+
         // uninitialized index
         JdbmIndex<String, Entry> jdbmIndex = new JdbmIndex<String, Entry>();
-        jdbmIndex.setWkDirPath( new File( dbFileDir, "foo" ) );
+        jdbmIndex.setWkDirPath( wkdir );
         assertEquals( "foo", jdbmIndex.getWkDirPath().getName() );
 
         // initialized index
         initIndex();
+        
         try
         {
-            idx.setWkDirPath( new File( dbFileDir, "foo" ) );
+            idx.setWkDirPath( wkdir );
             fail( "Should not be able to set wkDirPath after initialization." );
         }
         catch ( Exception e )
         {
         }
+        
         assertEquals( dbFileDir, idx.getWkDirPath() );
 
         destroyIndex();
         jdbmIndex = new JdbmIndex<String, Entry>();
-        File wkdir = new File( dbFileDir, "foo" );
         wkdir.mkdirs();
         jdbmIndex.setWkDirPath( wkdir );
         initIndex( jdbmIndex );
@@ -565,8 +575,8 @@ public class JdbmIndexTest
         try
         {
             AttributeType noEqMatchAttribute = new AttributeType( "1.1" );
-
-            jdbmIndex.init( schemaManager, noEqMatchAttribute, dbFileDir );
+            jdbmIndex.setWkDirPath( dbFileDir );
+            jdbmIndex.init( schemaManager, noEqMatchAttribute );
             fail( "should not get here" );
         }
         catch ( IOException e )
@@ -583,8 +593,8 @@ public class JdbmIndexTest
     public void testSingleValuedAttribute() throws Exception
     {
         JdbmIndex<Object, Object> jdbmIndex = new JdbmIndex<Object, Object>();
-        jdbmIndex.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( SchemaConstants.CREATORS_NAME_AT ),
-            dbFileDir );
+        jdbmIndex.setWkDirPath( dbFileDir );
+        jdbmIndex.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( SchemaConstants.CREATORS_NAME_AT ) );
         jdbmIndex.close();
     }
 }

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java Sat Oct 30 14:35:55 2010
@@ -124,6 +124,7 @@ public class JdbmRdnIndexTest
 
             // created by TransactionManager, if transactions are not disabled
             File logFile = new File( idx.getWkDirPath(), idx.getAttribute().getOid() + ".lg" );
+            
             if ( logFile.exists() )
             {
                 assertTrue( logFile.delete() );
@@ -136,7 +137,9 @@ public class JdbmRdnIndexTest
 
     void initIndex() throws Exception
     {
-        initIndex( new JdbmRdnIndex<Long>() );
+        JdbmRdnIndex<Long> index = new JdbmRdnIndex<Long>();
+        index.setWkDirPath( dbFileDir );
+        initIndex( index );
     }
 
 
@@ -147,7 +150,7 @@ public class JdbmRdnIndexTest
             jdbmIdx = new JdbmRdnIndex<Long>();
         }
 
-        jdbmIdx.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( ApacheSchemaConstants.APACHE_RDN_AT_OID ), dbFileDir );
+        jdbmIdx.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( ApacheSchemaConstants.APACHE_RDN_AT_OID ) );
         this.idx = jdbmIdx;
     }
 
@@ -185,26 +188,30 @@ public class JdbmRdnIndexTest
     @Test
     public void testWkDirPath() throws Exception
     {
+        File wkdir = new File( dbFileDir, "foo" );
+
         // uninitialized index
         JdbmRdnIndex<Long> jdbmRdnIndex = new JdbmRdnIndex<Long>();
-        jdbmRdnIndex.setWkDirPath( new File( dbFileDir, "foo" ) );
+        jdbmRdnIndex.setWkDirPath( wkdir );
         assertEquals( "foo", jdbmRdnIndex.getWkDirPath().getName() );
 
         // initialized index
         initIndex();
+        
         try
         {
-            idx.setWkDirPath( new File( dbFileDir, "foo" ) );
+            idx.setWkDirPath( wkdir );
             fail( "Should not be able to set wkDirPath after initialization." );
         }
         catch ( Exception e )
         {
         }
+        
         assertEquals( dbFileDir, idx.getWkDirPath() );
 
         destroyIndex();
+        
         jdbmRdnIndex = new JdbmRdnIndex<Long>();
-        File wkdir = new File( dbFileDir, "foo" );
         wkdir.mkdirs();
         jdbmRdnIndex.setWkDirPath( wkdir );
         initIndex( jdbmRdnIndex );

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java Sat Oct 30 14:35:55 2010
@@ -152,8 +152,14 @@ public class JdbmStoreTest
         store.setCacheSize( 10 );
         store.setPartitionDir( wkdir );
         store.setSyncOnWrite( false );
-        store.addIndex( new JdbmIndex( SchemaConstants.OU_AT_OID ) );
-        store.addIndex( new JdbmIndex( SchemaConstants.UID_AT_OID ) );
+
+        JdbmIndex ouIndex = new JdbmIndex( SchemaConstants.OU_AT_OID );
+        ouIndex.setWkDirPath( wkdir );
+        store.addIndex( ouIndex );
+        
+        JdbmIndex uidIndex = new JdbmIndex( SchemaConstants.UID_AT_OID );
+        uidIndex.setWkDirPath( wkdir );
+        store.addIndex( uidIndex );
 
         StoreUtils.loadExampleData( store, schemaManager );
         LOG.debug( "Created new store" );
@@ -231,7 +237,8 @@ public class JdbmStoreTest
         store.setSyncOnWrite( true ); // for code coverage
 
         assertNull( store.getAliasIndex() );
-        store.addIndex( new JdbmIndex<String, Attributes>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ) );
+        Index<String, Attributes, Long> index = new JdbmIndex<String, Attributes>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID );
+        store.addIndex( index );
         assertNotNull( store.getAliasIndex() );
 
         assertEquals( JdbmStore.DEFAULT_CACHE_SIZE, store.getCacheSize() );

Propchange: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,4 +1,5 @@
 /directory/apacheds/branches/apacheds-codec-merge/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:982369-987590
+/directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:980138-980935
 /directory/apacheds/branches/apacheds-replication/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:749790-764110
 /directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree:806623-810034

Propchange: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,4 +1,5 @@
 /directory/apacheds/branches/apacheds-codec-merge/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:982369-987590
+/directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:980138-980935
 /directory/apacheds/branches/apacheds-replication/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:749790-764110
 /directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java:809853-810034

Propchange: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,4 +1,5 @@
 /directory/apacheds/branches/apacheds-codec-merge/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:982369-987590
+/directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:980138-980935
 /directory/apacheds/branches/apacheds-replication/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:749790-764110
 /directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/schema:806623-810034

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java Sat Oct 30 14:35:55 2010
@@ -29,6 +29,7 @@ import java.io.File;
 
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.InstanceLayout;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
@@ -52,6 +53,7 @@ public class PartitionSchemaLoaderTest
 {
     private static SchemaManager schemaManager;
     private static DirectoryService directoryService;
+    private static InstanceLayout instanceLayout;
 
 
     @BeforeClass public static void setUp() throws Exception
@@ -59,13 +61,15 @@ public class PartitionSchemaLoaderTest
         // setup working directory
         directoryService = new DefaultDirectoryService();
         File workingDirectory = new File( System.getProperty( "workingDirectory", System.getProperty( "user.dir" ) ) );
+        instanceLayout = new InstanceLayout( workingDirectory );
+        directoryService.setInstanceLayout( instanceLayout );
 
         if ( ! workingDirectory.exists() )
         {
             workingDirectory.mkdirs();
         }
 
-        directoryService.setWorkingDirectory( workingDirectory );
+        directoryService.getInstanceLayout().setPartitionsDir( workingDirectory );
 
         // --------------------------------------------------------------------
         // Load the bootstrap schemas to start up the schema partition

Propchange: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,4 +1,5 @@
 /directory/apacheds/branches/apacheds-codec-merge/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:982369-987590
+/directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:980138-980935
 /directory/apacheds/branches/apacheds-replication/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:749790-764110
 /directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java:806623-810034

Propchange: directory/apacheds/trunk/kerberos-shared/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/kerberos-shared:982369-987590
+/directory/apacheds/branches/apacheds-config/kerberos-shared:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/kerberos-shared:980138-980936

Propchange: directory/apacheds/trunk/kerberos-test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/kerberos-test:982369-987590
+/directory/apacheds/branches/apacheds-config/kerberos-test:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/kerberos-test:980138-980936

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java Sat Oct 30 14:35:55 2010
@@ -43,7 +43,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.StringValue;
 import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.exception.LdapReferralException;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.BindResponse;

Propchange: directory/apacheds/trunk/ldif-partition/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/ldif-partition:982369-987590
+/directory/apacheds/branches/apacheds-config/ldif-partition:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/ldif-partition:980138-980936

Propchange: directory/apacheds/trunk/protocol-changepw/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/protocol-changepw:982369-987590
+/directory/apacheds/branches/apacheds-config/protocol-changepw:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-changepw:980138-980936

Propchange: directory/apacheds/trunk/protocol-dhcp/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/protocol-dhcp:982369-987590
+/directory/apacheds/branches/apacheds-config/protocol-dhcp:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-dhcp:980138-980936

Propchange: directory/apacheds/trunk/protocol-dns/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/protocol-dns:982369-987590
+/directory/apacheds/branches/apacheds-config/protocol-dns:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-dns:980138-980936

Propchange: directory/apacheds/trunk/protocol-kerberos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/protocol-kerberos:982369-987590
+/directory/apacheds/branches/apacheds-config/protocol-kerberos:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-kerberos:980138-980936

Propchange: directory/apacheds/trunk/protocol-ldap/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/protocol-ldap:982369-987590
+/directory/apacheds/branches/apacheds-config/protocol-ldap:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-ldap:980138-980936

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java Sat Oct 30 14:35:55 2010
@@ -696,7 +696,7 @@ public class LdapServer extends Director
     // ------------------------------------------------------------------------
 
     /**
-     * Registeres the specified {@link ExtendedOperationHandler} to this
+     * Registers the specified {@link ExtendedOperationHandler} to this
      * protocol provider to provide a specific LDAP extended operation.
      *
      * @param eoh an extended operation handler

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java Sat Oct 30 14:35:55 2010
@@ -1043,6 +1043,23 @@ public class SearchHandler extends LdapR
         }
         catch ( Exception e )
         {
+            /*
+             * From RFC 2251 Section 4.11:
+             *
+             * In the event that a server receives an Abandon Request on a Search
+             * operation in the midst of transmitting responses to the Search, that
+             * server MUST cease transmitting entry responses to the abandoned
+             * request immediately, and MUST NOT send the SearchResultDone. Of
+             * course, the server MUST ensure that only properly encoded LDAPMessage
+             * PDUs are transmitted.
+             *
+             * SO DON'T SEND BACK ANYTHING!!!!!
+             */
+            if ( e instanceof OperationAbandonedException )
+            {
+                return;
+            }
+
             // If it was a persistent search and if we had an exception,
             // we set the flag to remove the request from the session
             if ( isPersistentSearch )
@@ -1514,23 +1531,6 @@ public class SearchHandler extends LdapR
      */
     public void handleException( LdapSession session, ResultResponseRequest req, Exception e )
     {
-        /*
-         * From RFC 2251 Section 4.11:
-         *
-         * In the event that a server receives an Abandon Request on a Search
-         * operation in the midst of transmitting responses to the Search, that
-         * server MUST cease transmitting entry responses to the abandoned
-         * request immediately, and MUST NOT send the SearchResultDone. Of
-         * course, the server MUST ensure that only properly encoded LDAPMessage
-         * PDUs are transmitted.
-         *
-         * SO DON'T SEND BACK ANYTHING!!!!!
-         */
-        if ( e instanceof OperationAbandonedException )
-        {
-            return;
-        }
-
         LdapResult result = req.getResultResponse().getLdapResult();
 
         /*
@@ -1664,15 +1664,7 @@ public class SearchHandler extends LdapR
      */
     public void handleSyncreplSearch( LdapSession session, SearchRequest req ) throws LdapException
     {
-        try
-        {
-            replicationProvider.handleSyncRequest( session, req );
-        }
-        catch( Exception e )
-        {
-            session.unregisterOutstandingRequest( req );
-            handleException( session, req, e );
-        }
+        replicationProvider.handleSyncRequest( session, req );
     }
 
 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java Sat Oct 30 14:35:55 2010
@@ -179,7 +179,7 @@ public class SyncReplConsumer implements
 
         if ( config.isStoreCookieInFile() )
         {
-            File cookieDir = new File( directoryservice.getWorkingDirectory(), "cookies" );
+            File cookieDir = new File( directoryservice.getInstanceLayout().getRunDirectory(), "cookies" );
             cookieDir.mkdir();
 
             cookieFile = new File( cookieDir, String.valueOf( config.getReplicaId() ) );
@@ -511,21 +511,6 @@ public class SyncReplConsumer implements
         {
             try
             {
-                boolean exists;
-                
-                do
-                {
-                    // first check for the existence of base DN, if not, keep checking at the default refresh intervals
-                    exists = connection.exists( config.getBaseDn() );
-                    
-                    if ( !exists )
-                    {
-                        LOG.warn( "replica base DN {} doesn't exist on the peer, retrying after {} milliseconds", config.getBaseDn(), config.getRefreshInterval() );
-                        Thread.sleep( config.getRefreshInterval() );
-                    }
-                }
-                while( !exists );
-                
                 LOG.debug( "==================== Refresh And Persist ==========" );
                 doSyncSearch( SynchronizationModeEnum.REFRESH_AND_PERSIST, false );
             }

Propchange: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,4 +1,5 @@
 /directory/apacheds/branches/apacheds-codec-merge/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:982369-987590
+/directory/apacheds/branches/apacheds-config/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:980138-980936
 /directory/apacheds/branches/apacheds-replication/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncReplConsumer.java:749790-762530
 /directory/apacheds/branches/apacheds-schema/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncReplConsumer.java:806623-896441

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java Sat Oct 30 14:35:55 2010
@@ -145,7 +145,7 @@ public class SyncReplProvider implements
             this.ldapServer = server;
             this.dirService = server.getDirectoryService();
 
-            File workDir = dirService.getWorkingDirectory();
+            File workDir = dirService.getInstanceLayout().getLogDirectory();
             syncReplData = new File( workDir, "syncrepl-data" );
             if ( !syncReplData.exists() )
             {
@@ -248,10 +248,6 @@ public class SyncReplProvider implements
                 }
             }
         }
-        catch( LdapException e )
-        {
-            throw e;
-        }
         catch ( Exception e )
         {
             LOG.error( "Failed to handle the syncrepl request", e );

Propchange: directory/apacheds/trunk/protocol-ntp/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/protocol-ntp:982369-987590
+/directory/apacheds/branches/apacheds-config/protocol-ntp:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-ntp:980138-980936

Propchange: directory/apacheds/trunk/protocol-shared/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/protocol-shared:982369-987590
+/directory/apacheds/branches/apacheds-config/protocol-shared:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-shared:980138-980936

Propchange: directory/apacheds/trunk/server-annotations/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/server-annotations:982369-987590
+/directory/apacheds/branches/apacheds-config/server-annotations:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/server-annotations:980138-980937

Modified: directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java?rev=1029084&r1=1029083&r2=1029084&view=diff
==============================================================================
--- directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java (original)
+++ directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java Sat Oct 30 14:35:55 2010
@@ -91,7 +91,7 @@ public class DirectoryServiceAnnotationT
         assertEquals( "classDS", service.getInstanceId() );
         
         service.shutdown();
-        FileUtils.deleteDirectory( service.getWorkingDirectory() );
+        FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
     }
 
 
@@ -105,7 +105,7 @@ public class DirectoryServiceAnnotationT
         assertEquals( "methodDS", service.getInstanceId() );
         
         service.shutdown();
-        FileUtils.deleteDirectory( service.getWorkingDirectory() );
+        FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
     }
     
     
@@ -163,7 +163,7 @@ public class DirectoryServiceAnnotationT
         assertTrue( service.getAdminSession().exists( new DN( "dc=example,dc=com" ) ) );
 
         service.shutdown();
-        FileUtils.deleteDirectory( service.getWorkingDirectory() );
+        FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
     }
     
     
@@ -261,7 +261,7 @@ public class DirectoryServiceAnnotationT
         ldapServer.stop();
         service.shutdown();
         
-        FileUtils.deleteDirectory( service.getWorkingDirectory() );
+        FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
     }
 
 }

Propchange: directory/apacheds/trunk/server-integ/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/server-integ:982369-987590
+/directory/apacheds/branches/apacheds-config/server-integ:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/server-integ:980138-980937

Propchange: directory/apacheds/trunk/server-jndi/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 14:35:55 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-codec-merge/server-jndi:982369-987590
+/directory/apacheds/branches/apacheds-config/server-jndi:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/server-jndi:980138-980937



Mime
View raw message