directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r556219 - in /directory/apacheds/trunk: core-unit/src/main/java/org/apache/directory/server/core/unit/ core-unit/src/test/java/org/apache/directory/server/core/ core-unit/src/test/java/org/apache/directory/server/core/configuration/ core-un...
Date Sat, 14 Jul 2007 04:01:38 GMT
Author: akarasulu
Date: Fri Jul 13 21:01:36 2007
New Revision: 556219

URL: http://svn.apache.org/viewvc?view=rev&rev=556219
Log:
made it so partition config does not have handle on the Partition object

Modified:
    directory/apacheds/trunk/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
    directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java
    directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java
    directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
    directory/apacheds/trunk/core-unit/src/test/resources/log4j.properties
    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/configuration/MutablePartitionConfiguration.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartitionConfiguration.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
    directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/NtpITest.java
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SaslGssapiBindITest.java
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
    directory/apacheds/trunk/server-xml/src/main/resources/server.xml

Modified: directory/apacheds/trunk/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java (original)
+++ directory/apacheds/trunk/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java Fri Jul 13 21:01:36 2007
@@ -152,7 +152,7 @@
             // Add apache.org paritition since all work will be done here
             MutablePartitionConfiguration partConfig = new MutablePartitionConfiguration();
             partConfig.setIndexedAttributes( indexedAttributes );
-            partConfig.setName( "test" );
+            partConfig.setId( "test" );
             partConfig.setSuffix( "ou=test" );
             partConfig.setContextEntry( attributes );
             

Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java (original)
+++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java Fri Jul 13 21:01:36 2007
@@ -67,7 +67,7 @@
         if ( getName().indexOf( "WithIndices" ) != -1 )
         {
             MutablePartitionConfiguration sysConf = new MutablePartitionConfiguration();
-            sysConf.setName( "system" );
+            sysConf.setId( "system" );
             Attributes attrs = new AttributesImpl( "objectClass", "top", true );
             attrs.get( "objectClass" ).add( "organizationalUnit" );
             attrs.put( "ou", "system" );

Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java (original)
+++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java Fri Jul 13 21:01:36 2007
@@ -33,7 +33,6 @@
 import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
 import org.apache.directory.server.core.configuration.RemovePartitionConfiguration;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 
@@ -55,13 +54,12 @@
     public void testAddAndRemove() throws Exception
     {
         MutablePartitionConfiguration partitionCfg = new MutablePartitionConfiguration();
-        partitionCfg.setName( "removable" );
+        partitionCfg.setId( "removable" );
         partitionCfg.setSuffix( "ou=removable" );
         Attributes ctxEntry = new AttributesImpl( true );
         ctxEntry.put( "objectClass", "top" );
         ctxEntry.put( "ou", "removable" );
         partitionCfg.setContextEntry( ctxEntry );
-        partitionCfg.setContextPartition( new JdbmPartition() );
 
         // Test AddContextPartition
         AddPartitionConfiguration addCfg = new AddPartitionConfiguration( partitionCfg );

Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java (original)
+++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java Fri Jul 13 21:01:36 2007
@@ -55,7 +55,7 @@
     {
 
         MutablePartitionConfiguration partition = new MutablePartitionConfiguration();
-        partition.setName( "apache" );
+        partition.setId( "apache" );
         partition.setSuffix( suffix );
 
         Set<Object> indexedAttributes = new HashSet<Object>();

Modified: directory/apacheds/trunk/core-unit/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/resources/log4j.properties?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core-unit/src/test/resources/log4j.properties (original)
+++ directory/apacheds/trunk/core-unit/src/test/resources/log4j.properties Fri Jul 13 21:01:36 2007
@@ -1,4 +1,4 @@
-log4j.rootCategory=ERROR, stdout
+log4j.rootCategory=OFF, stdout
 
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

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?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- 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 Fri Jul 13 21:01:36 2007
@@ -846,7 +846,7 @@
         // --------------------------------------------------------------------
         
         MutablePartitionConfiguration schemaPartitionConfig = new MutablePartitionConfiguration();
-        schemaPartitionConfig.setName( "schema" );
+        schemaPartitionConfig.setId( "schema" );
         schemaPartitionConfig.setCacheSize( 1000 );
         
         DbFileListing listing = null;
@@ -870,7 +870,6 @@
         schemaPartitionConfig.setContextEntry( entry );
         JdbmPartition schemaPartition = new JdbmPartition();
         schemaPartition.init( configuration, schemaPartitionConfig );
-        schemaPartitionConfig.setContextPartition( schemaPartition );
 
         // --------------------------------------------------------------------
         // Enable schemas of all indices of partition configurations 
@@ -999,7 +998,8 @@
 
         partitionNexus = new DefaultPartitionNexus( new AttributesImpl() );
         partitionNexus.init( configuration, null );
-        partitionNexus.addContextPartition( new AddContextPartitionOperationContext( schemaPartitionConfig ) );
+        partitionNexus.addContextPartition( 
+            new AddContextPartitionOperationContext( schemaPartitionConfig, schemaPartition ) );
 
         interceptorChain = new InterceptorChain();
         interceptorChain.init( configuration );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java Fri Jul 13 21:01:36 2007
@@ -25,8 +25,6 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
-import org.apache.directory.server.core.partition.Partition;
-
 
 /**
  * A mutable version of {@link PartitionConfiguration}.
@@ -44,9 +42,9 @@
     }
 
 
-    public void setName( String name )
+    public void setId( String id )
     {
-        super.setName( name );
+        super.setId( id );
     }
 
 
@@ -56,9 +54,9 @@
     }
 
 
-    public void setContextPartition( Partition partition )
+    public void setPartitionClassName( String partitionClassName )
     {
-        super.setContextPartition( partition );
+        super.setPartitionClassName( partitionClassName );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java Fri Jul 13 21:01:36 2007
@@ -27,8 +27,6 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
-import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.schema.registries.MatchingRuleRegistry;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -46,14 +44,16 @@
 {
     /** The name of reserved system partition */
     public static final String SYSTEM_PARTITION_NAME = "system";
+    public static final String DEFAULT_PARTITION_IMPLEMENTATION =
+        "org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition";
     public static final int DEFAULT_CACHE_SIZE = 10000;
 
-    private String name;
+    private String id;
     private int cacheSize = -1;
     private String suffix;
     private Set indexedAttributes; // Set<String> or <IndexConfiguration>
     private Attributes contextEntry = new AttributesImpl( true );
-    private Partition contextPartition = new JdbmPartition();
+    private String partitionClassName = DEFAULT_PARTITION_IMPLEMENTATION;
 
 
     /**
@@ -69,9 +69,9 @@
      * Returns user-defined name of the {@link Partition} that
      * this configuration configures.
      */
-    public String getName()
+    public String getId()
     {
-        return name;
+        return id;
     }
 
 
@@ -79,10 +79,10 @@
      * Sets user-defined name of the {@link Partition} that
      * this configuration configures.
      */
-    protected void setName( String name )
+    protected void setId( String id )
     {
-        name = name.trim();
-        this.name = name;
+        id = id.trim();
+        this.id = id;
     }
 
 
@@ -106,24 +106,24 @@
 
 
     /**
-     * Returns the {@link Partition} that this configuration configures.
+     * Returns the partition implementation's fully qualified class name.
      */
-    public Partition getContextPartition()
+    public String getPartitionClassName()
     {
-        return contextPartition;
+        return partitionClassName;
     }
 
 
     /**
-     * Sets the {@link Partition} that this configuration configures.
+     * Sets the fully qualified class name of the partition implementation.
      */
-    protected void setContextPartition( Partition partition )
+    protected void setPartitionClassName( String partitionClassName )
     {
-        if ( partition == null )
+        if ( partitionClassName == null )
         {
-            throw new NullPointerException( "partition" );
+            throw new NullPointerException( "partitionClassName" );
         }
-        this.contextPartition = partition;
+        this.partitionClassName = partitionClassName;
     }
 
 
@@ -199,7 +199,7 @@
      */
     public void validate()
     {
-        if ( getName() == null || getName().length() == 0 )
+        if ( getId() == null || getId().length() == 0 )
         {
             throw new ConfigurationException( "Name is not specified." );
         }
@@ -207,6 +207,11 @@
         if ( getSuffix() == null )
         {
             throw new ConfigurationException( "Suffix is not specified." );
+        }
+
+        if ( getPartitionClassName() == null )
+        {
+            throw new ConfigurationException( "PartitionClassName is not specified." );
         }
     }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java Fri Jul 13 21:01:36 2007
@@ -291,7 +291,7 @@
             PartitionConfiguration cfg = ( PartitionConfiguration ) i.next();
             cfg.validate();
 
-            String name = cfg.getName();
+            String name = cfg.getId();
             if ( names.contains( name ) )
             {
                 throw new ConfigurationException( "Duplicate partition name: " + name );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java Fri Jul 13 21:01:36 2007
@@ -19,61 +19,142 @@
  */
 package org.apache.directory.server.core.interceptor.context;
 
+
+import javax.naming.NamingException;
+
 import org.apache.directory.server.core.configuration.PartitionConfiguration;
+import org.apache.directory.server.core.partition.Partition;
+import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * A AddContextPartition context used for Interceptors. It contains all the informations
- * needed for the addContextPartition operation, and used by all the interceptors
+ * needed for the addContextPartition operation, and used by all the interceptors.  If 
+ * it does not have a partition set for it, then it will load and instantiate it 
+ * automatically using the information in the partition configuration.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
 public class AddContextPartitionOperationContext  extends EmptyOperationContext
 {
+    private static final Logger log = LoggerFactory.getLogger( AddContextPartitionOperationContext.class );
+    
     /** The context partition configuration */
-    private PartitionConfiguration cfg;
+    private PartitionConfiguration partitionConfiguration;
+    /** the instantiated partition class */
+    private Partition partition;
+       
     
     /**
      * Creates a new instance of AddContextPartitionOperationContext.
+     *
+     * @param entryDn The partition configuration to add
      */
-    public AddContextPartitionOperationContext()
+    public AddContextPartitionOperationContext( PartitionConfiguration cfg )
     {
+        super();
+        this.partitionConfiguration = cfg;
     }
     
+    
     /**
      * Creates a new instance of AddContextPartitionOperationContext.
      *
      * @param entryDn The partition configuration to add
      */
-    public AddContextPartitionOperationContext( PartitionConfiguration cfg )
+    public AddContextPartitionOperationContext( PartitionConfiguration cfg, Partition partition )
     {
-        super();
-        this.cfg = cfg;
+        this( cfg );
+        this.partition = partition;
     }
     
+    
     /**
      * @see Object#toString()
      */
     public String toString()
     {
-        return "AddContextPartitionOperationContext for partition context '" + cfg.getName() + "'";
+        return "AddContextPartitionOperationContext for partition context '" + partitionConfiguration.getId() + "'";
     }
 
+    
     /**
      * @return The partition configuration
      */
-    public PartitionConfiguration getCfg()
+    public PartitionConfiguration getPartitionConfiguration()
     {
-        return cfg;
+        return partitionConfiguration;
     }
 
+    
     /**
      * Set the partition configuration
      * 
-     * @param cfg The configuration
+     * @param partitionConfiguration The configuration
+     */
+    public void setPartitionConfiguration( PartitionConfiguration partitionConfiguration )
+    {
+        this.partitionConfiguration = partitionConfiguration;
+    }
+
+
+    /**
+     * Get's the partition instance.
+     *
+     * @return the partition to add
      */
-    public void setCfg( PartitionConfiguration cfg )
+    public Partition getPartition() throws NamingException
     {
-        this.cfg = cfg;
+        if ( partition != null )
+        {
+            return partition;
+        }
+        
+        if ( partitionConfiguration == null )
+        {
+            throw new IllegalStateException( "Cannot get instance of partition without a proper " +
+                    "partition configuration." );
+        }
+        
+        Class partitionClass;
+        try
+        {
+            partitionClass = Class.forName( partitionConfiguration.getPartitionClassName() );
+        }
+        catch ( ClassNotFoundException e )
+        {
+            String msg = "Could not load partition implementation class '" 
+                + partitionConfiguration.getPartitionClassName() + "' for partition with id " 
+                + partitionConfiguration.getId();
+            log.error( msg );
+            throw new LdapConfigurationException( msg, e );
+        }
+        
+        try
+        {
+            partition = ( Partition ) partitionClass.newInstance();
+        }
+        catch ( InstantiationException e )
+        {
+            String msg = "No default constructor in partition implementation class '" 
+                + partitionConfiguration.getPartitionClassName() + "' for partition with id " 
+                + partitionConfiguration.getId();
+            log.error( msg );
+            throw new LdapConfigurationException( msg, e );
+        }
+        catch ( IllegalAccessException e )
+        {
+            String msg = "Default constructor for partition implementation class '" 
+                + partitionConfiguration.getPartitionClassName() + "' for partition with id " 
+                + partitionConfiguration.getId() + " is not publicly accessible.";
+            log.error( msg );
+            throw new LdapConfigurationException( msg, e );
+        }
+        
+        return partition;
     }
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java Fri Jul 13 21:01:36 2007
@@ -89,7 +89,7 @@
             }
         }
     }
-
+    
 
     /**
      * Override this method to put your initialization code.

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?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- 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 Fri Jul 13 21:01:36 2007
@@ -205,7 +205,19 @@
         rootDSE.put( attr );
     }
 
+    
+    public PartitionConfiguration getConfiguration()
+    {
+        throw new UnsupportedOperationException( "The NEXUS partition does not have a " +
+                "standard partition configuration associated with it." );
+    }
+    
 
+    public String getId()
+    {
+        return "NEXUS";
+    }
+    
     public void init( DirectoryServiceConfiguration factoryCfg, PartitionConfiguration cfg )
         throws NamingException
     {
@@ -219,8 +231,9 @@
         this.attrRegistry = this.factoryCfg.getRegistries().getAttributeTypeRegistry();
         this.oidRegistry = this.factoryCfg.getRegistries().getOidRegistry();
         
-        List<PartitionConfiguration> initializedPartitionCfgs = new ArrayList<PartitionConfiguration>();
-        initializedPartitionCfgs.add( initializeSystemPartition() );
+        initializeSystemPartition();
+        List<Partition> initializedPartitions = new ArrayList<Partition>();
+        initializedPartitions.add( 0, this.system );
 
         Iterator i = factoryCfg.getStartupConfiguration().getPartitionConfigurations().iterator();
         try
@@ -228,8 +241,9 @@
             while ( i.hasNext() )
             {
                 PartitionConfiguration c = ( PartitionConfiguration ) i.next();
-                addContextPartition( new AddContextPartitionOperationContext( c ) );
-                initializedPartitionCfgs.add( 0, c );
+                AddContextPartitionOperationContext opCtx = new AddContextPartitionOperationContext( c );
+                addContextPartition( opCtx );
+                initializedPartitions.add( opCtx.getPartition() );
             }
             initialized = true;
         }
@@ -237,11 +251,10 @@
         {
             if ( !initialized )
             {
-                i = initializedPartitionCfgs.iterator();
+                i = initializedPartitions.iterator();
                 while ( i.hasNext() )
                 {
-                    PartitionConfiguration partitionCfg = ( PartitionConfiguration ) i.next();
-                    Partition partition = partitionCfg.getContextPartition();
+                    Partition partition = ( Partition ) i.next();
                     i.remove();
                     try
                     {
@@ -249,7 +262,7 @@
                     }
                     catch ( Exception e )
                     {
-                        log.warn( "Failed to destroy a partition: " + partitionCfg.getSuffix(), e );
+                        log.warn( "Failed to destroy a partition: " + partition.getSuffix(), e );
                     }
                     finally
                     {
@@ -295,7 +308,7 @@
             // check a few things to make sure users configured it properly
             // ---------------------------------------------------------------
 
-            if ( ! systemCfg.getName().equals( "system" ) ) 
+            if ( ! systemCfg.getId().equals( "system" ) ) 
             {
                 throw new ConfigurationException( "System partition has wrong name: should be 'system'." );
             }
@@ -356,7 +369,7 @@
         else
         {
             systemCfg = new MutableBTreePartitionConfiguration();
-            systemCfg.setName( "system" );
+            systemCfg.setId( "system" );
             
             // @TODO need to make this configurable for the system partition
             systemCfg.setCacheSize( 500 );
@@ -364,7 +377,7 @@
             systemCfg.setSuffix( PartitionNexus.SYSTEM_PARTITION_SUFFIX );
     
             // Add indexed attributes for system partition
-            Set<String> indexedSystemAttrs = new HashSet<String>();
+            Set<Object> indexedSystemAttrs = new HashSet<Object>();
             indexedSystemAttrs.add( Oid.ALIAS );
             indexedSystemAttrs.add( Oid.EXISTANCE );
             indexedSystemAttrs.add( Oid.HIERARCHY );
@@ -391,7 +404,6 @@
 
         system = new JdbmPartition(); // using default implementation.
         system.init( factoryCfg, systemCfg );
-        systemCfg.setContextPartition( system );
         String key = system.getSuffix().toString();
         
         if ( partitions.containsKey( key ) )
@@ -402,7 +414,6 @@
         synchronized ( partitionLookupTree )
         {
             partitions.put( key, system );
-        
             partitionLookupTree.recursivelyAddPartition( partitionLookupTree, system.getSuffix(), 0, system );
 
             Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR );
@@ -561,8 +572,10 @@
 
     public synchronized void addContextPartition( OperationContext addContextPartitionContext ) throws NamingException
     {
-        PartitionConfiguration config = ((AddContextPartitionOperationContext)addContextPartitionContext).getCfg();
-        Partition partition = config.getContextPartition();
+        AddContextPartitionOperationContext operationContext = 
+            ( AddContextPartitionOperationContext ) addContextPartitionContext;
+        PartitionConfiguration config = operationContext.getPartitionConfiguration();
+        Partition partition = operationContext.getPartition();
 
         // Turn on default indices
         String key = config.getSuffix();
@@ -580,7 +593,6 @@
         synchronized ( partitionLookupTree )
         {
             partitions.put( partition.getSuffix().toString(), partition );
-            
             partitionLookupTree.recursivelyAddPartition( partitionLookupTree, partition.getSuffix(), 0, partition );
 
             Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/Partition.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/Partition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/Partition.java Fri Jul 13 21:01:36 2007
@@ -46,6 +46,22 @@
 public interface Partition
 {
     /**
+     * Get's the configuration for this partition.
+     *
+     * @return the configuration for this partition.
+     */
+    PartitionConfiguration getConfiguration();
+    
+    
+    /**
+     * Get's the unique identifier for this partition.
+     *
+     * @return the unique identifier for this partition
+     */
+    String getId();
+    
+    
+    /**
      * Initializes this partition.
      */
     void init( DirectoryServiceConfiguration factoryCfg, PartitionConfiguration cfg ) throws NamingException;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java Fri Jul 13 21:01:36 2007
@@ -159,7 +159,20 @@
         return this.configuration.getPartitionNexus().getLdapContext();
     }
 
+    
+    public String getId()
+    {
+        throw new UnsupportedOperationException( "Nexus partition proxy objects do not have an Id." );
+    }
 
+    
+    public PartitionConfiguration getConfiguration()
+    {
+        throw new UnsupportedOperationException( "Nexus partition proxy objects do not have a " +
+                "partition configuration." );
+    }
+
+    
     public void init( DirectoryServiceConfiguration factoryCfg, PartitionConfiguration cfg ) throws NamingException
     {
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java Fri Jul 13 21:01:36 2007
@@ -66,6 +66,7 @@
     /** the search engine used to search the database */
     private SearchEngine searchEngine = null;
     private Optimizer optimizer;
+    private BTreePartitionConfiguration cfg;
     
     protected AttributeTypeRegistry attributeTypeRegistry = null;
     protected OidRegistry oidRegistry = null;
@@ -83,6 +84,18 @@
     }
 
     
+    public BTreePartitionConfiguration getConfiguration()
+    {
+        return cfg;
+    }
+    
+    
+    public String getId()
+    {
+        return cfg.getId();
+    }
+    
+    
     /**
      * Allows for schema entity registries to be swapped out during runtime.  This is 
      * primarily here to facilitate the swap out of a temporary bootstrap registry.  
@@ -338,11 +351,12 @@
      * 
      * @param cfg
      */
-    protected void initOptimizer0( PartitionConfiguration cfg )
+    protected void initOptimizerAndConfiguration0( PartitionConfiguration cfg ) throws NamingException
     {
         if ( cfg instanceof BTreePartitionConfiguration )
         {
-            if ( ! ( ( BTreePartitionConfiguration ) cfg ).isOptimizerEnabled() )
+            this.cfg = ( BTreePartitionConfiguration ) cfg;
+            if ( ! this.cfg.isOptimizerEnabled() )
             {
                 optimizer = new NoOpOptimizer();
             }
@@ -353,6 +367,7 @@
         }
         else
         {
+            this.cfg = BTreePartitionConfiguration.convert( cfg );
             optimizer = new DefaultOptimizer( this );
         }
     }
@@ -361,7 +376,7 @@
     public void init( DirectoryServiceConfiguration factoryCfg, PartitionConfiguration cfg )
         throws NamingException
     {
-        initOptimizer0( cfg );
+        initOptimizerAndConfiguration0( cfg );
         initRegistries1( factoryCfg.getRegistries() );
         initIndices2( cfg.getIndexedAttributes() );
         initSuffixEntry3( cfg.getSuffix(), cfg.getContextEntry() );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartitionConfiguration.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartitionConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartitionConfiguration.java Fri Jul 13 21:01:36 2007
@@ -77,9 +77,9 @@
         BTreePartitionConfiguration newConfig = new BTreePartitionConfiguration();
         newConfig.setCacheSize( config.getCacheSize() );
         newConfig.setContextEntry( config.getContextEntry() );
-        newConfig.setContextPartition( config.getContextPartition() );
+        newConfig.setPartitionClassName( config.getPartitionClassName() );
         newConfig.setIndexedAttributes( config.getIndexedAttributes() );
-        newConfig.setName( config.getName() );
+        newConfig.setId( config.getId() );
         newConfig.setSuffix( config.getSuffix() );
         return newConfig;
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java Fri Jul 13 21:01:36 2007
@@ -19,13 +19,13 @@
  */
 package org.apache.directory.server.core.partition.impl.btree;
 
+
 import java.util.Set;
 
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
 import org.apache.directory.server.core.configuration.PartitionConfiguration;
-import org.apache.directory.server.core.partition.Partition;
 
 
 /**
@@ -42,21 +42,21 @@
     }
     
     
-    public void setName( String name )
+    public void setId( String name )
     {
-        super.setName( name );
+        super.setId( name );
     }
 
 
-    public void setIndexedAttributes( Set indexedAttributes )
+    public void setIndexedAttributes( Set<Object> indexedAttributes )
     {
         super.setIndexedAttributes( indexedAttributes );
     }
 
 
-    public void setContextPartition( Partition partition )
+    public void setPartitionClassName( String partitionClassName )
     {
-        super.setContextPartition( partition );
+        super.setPartitionClassName( partitionClassName );
     }
 
 
@@ -91,7 +91,7 @@
         newConfig.setCacheSize( config.getCacheSize() );
         newConfig.setContextEntry( config.getContextEntry() );
         newConfig.setIndexedAttributes( config.getIndexedAttributes() );
-        newConfig.setName( config.getName() );
+        newConfig.setId( config.getId() );
         newConfig.setSuffix( config.getSuffix() );
         newConfig.setSynchOnWrite( false );
         return newConfig;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Fri Jul 13 21:01:36 2007
@@ -83,7 +83,7 @@
         throws NamingException
     {
         // setup optimizer and registries for parent
-        initOptimizer0( cfg );
+        initOptimizerAndConfiguration0( cfg );
         initRegistries1( factoryCfg.getRegistries() );
         
         // initialize the store
@@ -92,13 +92,13 @@
         storeConfig.setCacheSize( cfg.getCacheSize() );
         storeConfig.setContextEntry( cfg.getContextEntry() );
         storeConfig.setIndexedAttributes( cfg.getIndexedAttributes() );
-        storeConfig.setName( cfg.getName() );
+        storeConfig.setName( cfg.getId() );
         storeConfig.setOidRegistry( oidRegistry );
         storeConfig.setSuffixDn( cfg.getSuffix() );
         
         storeConfig.setWorkingDirectory( new File( 
             factoryCfg.getStartupConfiguration().getWorkingDirectory().getPath()
-            + File.separator + cfg.getName() ) );
+            + File.separator + cfg.getId() ) );
         
         if ( cfg instanceof BTreePartitionConfiguration )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java Fri Jul 13 21:01:36 2007
@@ -773,7 +773,7 @@
         next.addContextPartition( opContext );
 
         // add referrals immediately after adding the new partition
-        Partition partition = ((AddContextPartitionOperationContext)opContext).getCfg().getContextPartition();
+        Partition partition = ( ( AddContextPartitionOperationContext ) opContext ).getPartition();
         LdapDN suffix = partition.getSuffix();
         Invocation invocation = InvocationStack.getInstance().peek();
         NamingEnumeration list = invocation.getProxy().search( 

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java Fri Jul 13 21:01:36 2007
@@ -131,8 +131,9 @@
         // --------------------------------------------------------------------
         
         MutablePartitionConfiguration pc = new MutablePartitionConfiguration();
-        pc.setName( "schema" );
+        pc.setId( "schema" );
         pc.setCacheSize( 1000 );
+        pc.setPartitionClassName( JdbmPartition.class.getName() );
         pc.setIndexedAttributes( extractor.getDbFileListing().getIndexedAttributes() );
         pc.setSuffix( "ou=schema" );
         

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java (original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java Fri Jul 13 21:01:36 2007
@@ -207,7 +207,7 @@
         }
         
         MutablePartitionConfiguration schemaPartitionConfig = new MutablePartitionConfiguration();
-        schemaPartitionConfig.setName( "schema" );
+        schemaPartitionConfig.setId( "schema" );
         schemaPartitionConfig.setCacheSize( 1000 );
         
         DbFileListing listing = null;
@@ -285,7 +285,6 @@
         };
         
         schemaPartition.init( dsc, schemaPartitionConfig );
-        schemaPartitionConfig.setContextPartition( schemaPartition );
 
         // --------------------------------------------------------------------
         // Initialize schema subsystem and reset registries

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java (original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java Fri Jul 13 21:01:36 2007
@@ -84,7 +84,7 @@
 
         // Add partition 'example'
         pcfg = new MutablePartitionConfiguration();
-        pcfg.setName( "example" );
+        pcfg.setId( "example" );
         pcfg.setSuffix( "dc=example,dc=com" );
 
         Set<Object> indexedAttrs = new HashSet<Object>();

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/MiscTest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/MiscTest.java (original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/MiscTest.java Fri Jul 13 21:01:36 2007
@@ -95,7 +95,7 @@
             entry.put( oc );
             oc.add( "top" );
             oc.add( "domain" );
-            partition.setName( "apache" );
+            partition.setId( "apache" );
             partition.setContextEntry( entry );
             partition.setIndexedAttributes( Collections.singleton( ( Object ) "dc" ) );
             partitions.add( partition );
@@ -116,7 +116,7 @@
             entry.put( oc );
             oc.add( "top" );
             oc.add( "domain" );
-            partition.setName( "apache" );
+            partition.setId( "apache" );
             partition.setContextEntry( entry );
             partition.setIndexedAttributes( Collections.singleton( ( Object ) "dc" ) );
             partitions.add( partition );

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/NtpITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/NtpITest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/NtpITest.java (original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/NtpITest.java Fri Jul 13 21:01:36 2007
@@ -77,7 +77,7 @@
 
         // Add partition 'example'
         pcfg = new MutablePartitionConfiguration();
-        pcfg.setName( "example" );
+        pcfg.setId( "example" );
         pcfg.setSuffix( "dc=example,dc=com" );
 
         Set<Object> indexedAttrs = new HashSet<Object>();

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java (original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java Fri Jul 13 21:01:36 2007
@@ -68,7 +68,7 @@
 
         // Add partition 'example'
         pcfg = new MutablePartitionConfiguration();
-        pcfg.setName( "example" );
+        pcfg.setId( "example" );
         pcfg.setSuffix( "dc=example,dc=com" );
 
         Set<Object> indexedAttrs = new HashSet<Object>();

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java (original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java Fri Jul 13 21:01:36 2007
@@ -67,7 +67,7 @@
 
         // Add partition 'example'
         pcfg = new MutablePartitionConfiguration();
-        pcfg.setName( "example" );
+        pcfg.setId( "example" );
         pcfg.setSuffix( "dc=example,dc=com" );
 
         Set<Object> indexedAttrs = new HashSet<Object>();

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SaslGssapiBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SaslGssapiBindITest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SaslGssapiBindITest.java (original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SaslGssapiBindITest.java Fri Jul 13 21:01:36 2007
@@ -98,7 +98,7 @@
 
         // Add partition 'example'
         pcfg = new MutablePartitionConfiguration();
-        pcfg.setName( "example" );
+        pcfg.setId( "example" );
         pcfg.setSuffix( "dc=example,dc=com" );
 
         Set<Object> indexedAttrs = new HashSet<Object>();

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java (original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java Fri Jul 13 21:01:36 2007
@@ -61,7 +61,7 @@
 
         // Add partition 'testing'
         pcfg = new MutablePartitionConfiguration();
-        pcfg.setName( "testing" );
+        pcfg.setId( "testing" );
         pcfg.setSuffix( "ou=testing" );
 
         indexedAttrs = new HashSet();
@@ -84,7 +84,7 @@
 
         // Add partition 'example'
         pcfg = new MutablePartitionConfiguration();
-        pcfg.setName( "example" );
+        pcfg.setId( "example" );
         pcfg.setSuffix( "dc=example" );
 
         indexedAttrs = new HashSet();
@@ -108,7 +108,7 @@
 
         // Add partition 'MixedCase'
         pcfg = new MutablePartitionConfiguration();
-        pcfg.setName( "mixedcase" );
+        pcfg.setId( "mixedcase" );
         pcfg.setSuffix( "dc=MixedCase" );
 
         indexedAttrs = new HashSet();
@@ -287,7 +287,7 @@
 
         // Add partition 'test=testing'
         pcfg = new MutablePartitionConfiguration();
-        pcfg.setName( "testing" );
+        pcfg.setId( "testing" );
         
         try
         {

Modified: directory/apacheds/trunk/server-xml/src/main/resources/server.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-xml/src/main/resources/server.xml?view=diff&rev=556219&r1=556218&r2=556219
==============================================================================
--- directory/apacheds/trunk/server-xml/src/main/resources/server.xml (original)
+++ directory/apacheds/trunk/server-xml/src/main/resources/server.xml Fri Jul 13 21:01:36 2007
@@ -297,10 +297,11 @@
   <!-- 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" />
+    <property name="id" value="system" />
     <property name="cacheSize" value="100" />
     <property name="suffix" value="ou=system" />
-
+    <property name="partitionClassName" 
+      value="org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition" />
     <!-- the optimizer is enabled by default but may not always be what     -->
     <!-- you want if your queries are really simple                         -->
     <property name="optimizerEnabled" value="true" />
@@ -369,9 +370,11 @@
 
 
   <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
-    <property name="name" value="example" />
+    <property name="id" value="example" />
     <property name="cacheSize" value="100" />
     <property name="suffix" value="dc=example,dc=com" />
+    <property name="partitionClassName" 
+      value="org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition" />
 
     <!-- the optimizer is enabled by default but may not always be what     -->
     <!-- you want if your queries are really simple                         -->



Mime
View raw message