directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r421288 - in /directory/branches/apacheds/optimization: core/src/main/java/org/apache/directory/server/core/configuration/ core/src/main/java/org/apache/directory/server/core/partition/ core/src/main/java/org/apache/directory/server/core/pa...
Date Wed, 12 Jul 2006 15:15:30 GMT
Author: akarasulu
Date: Wed Jul 12 08:15:30 2006
New Revision: 421288

URL: http://svn.apache.org/viewvc?rev=421288&view=rev
Log:
added and tested the overrides to the system configuration defaults

Modified:
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultDirectoryPartitionNexus.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexConfiguration.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
    directory/branches/apacheds/optimization/server-installers/src/main/installers/server.xml
    directory/branches/apacheds/optimization/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
    directory/branches/apacheds/optimization/server-main/server.xml

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java?rev=421288&r1=421287&r2=421288&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
Wed Jul 12 08:15:30 2006
@@ -55,13 +55,19 @@
     }
 
 
+    public void setSystemPartitionConfiguration( PartitionConfiguration systemPartitionConfiguration
)
+    {
+        super.setSystemPartitionConfiguration( systemPartitionConfiguration );
+    }
+    
+    
     public void setMaxThreads( int maxThreads )
     {
         super.setMaxThreads( maxThreads );
     }
     
     
-    public void setMaxTimeLimit( long maxTimeLimit )
+    public void setMaxTimeLimit( int maxTimeLimit )
     {
         super.setMaxTimeLimit( maxTimeLimit );
     }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java?rev=421288&r1=421287&r2=421288&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
Wed Jul 12 08:15:30 2006
@@ -58,7 +58,7 @@
 
     public static final int MAX_THREADS_DEFAULT = 4;
     public static final int MAX_SIZE_LIMIT_DEFAULT = 100;
-    public static final long MAX_TIME_LIMIT_DEFAULT = 10000;
+    public static final int MAX_TIME_LIMIT_DEFAULT = 10000;
 
     private File workingDirectory = new File( "server-work" );
     private boolean exitVmOnShutdown = true; // allow by default
@@ -67,10 +67,10 @@
     private boolean accessControlEnabled = false; // turn off by default
     private int maxThreads = MAX_THREADS_DEFAULT; // set to default value
     private int maxSizeLimit = MAX_SIZE_LIMIT_DEFAULT; // set to default value
-    private long maxTimeLimit = MAX_TIME_LIMIT_DEFAULT; // set to default value (milliseconds)
+    private int maxTimeLimit = MAX_TIME_LIMIT_DEFAULT; // set to default value (milliseconds)
     private Set authenticatorConfigurations; // Set<AuthenticatorConfiguration>
     private List interceptorConfigurations; // Set<InterceptorConfiguration>
-
+    private PartitionConfiguration systemPartitionConfiguration; 
     private Set bootstrapSchemas; // Set<BootstrapSchema>
     private Set contextPartitionConfigurations = new HashSet(); // Set<ContextPartitionConfiguration>
     private List testEntries = new ArrayList(); // List<Attributes>
@@ -481,14 +481,26 @@
     }
 
 
-    protected void setMaxTimeLimit( long maxTimeLimit )
+    protected void setMaxTimeLimit( int maxTimeLimit )
     {
         this.maxTimeLimit = maxTimeLimit;
     }
 
 
-    public long getMaxTimeLimit()
+    public int getMaxTimeLimit()
     {
         return maxTimeLimit;
+    }
+
+
+    protected void setSystemPartitionConfiguration( PartitionConfiguration systemPartitionConfiguration
)
+    {
+        this.systemPartitionConfiguration = systemPartitionConfiguration;
+    }
+
+
+    public PartitionConfiguration getSystemPartitionConfiguration()
+    {
+        return systemPartitionConfiguration;
     }
 }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultDirectoryPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultDirectoryPartitionNexus.java?rev=421288&r1=421287&r2=421288&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultDirectoryPartitionNexus.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultDirectoryPartitionNexus.java
Wed Jul 12 08:15:30 2006
@@ -42,9 +42,10 @@
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.configuration.PartitionConfiguration;
-import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
+import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmDirectoryPartition;
 import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.shared.ldap.MultiException;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeIdentifierException;
@@ -228,41 +229,127 @@
     private PartitionConfiguration initializeSystemPartition() throws NamingException
     {
         // initialize system partition first
-        MutablePartitionConfiguration systemCfg = new MutablePartitionConfiguration();
-        system = new JdbmDirectoryPartition(); // using default implementation.
-        systemCfg.setName( "system" );
-        
-        // @TODO need to make this configurable for the system partition
-        systemCfg.setCacheSize( 500 );
-        
-        systemCfg.setSuffix( DirectoryPartitionNexus.SYSTEM_PARTITION_SUFFIX );
-        systemCfg.setContextPartition( system );
+        MutableBTreePartitionConfiguration systemCfg;
+        PartitionConfiguration overrides = factoryCfg.getStartupConfiguration().getSystemPartitionConfiguration();
+        if ( overrides != null )
+        {
+            systemCfg = MutableBTreePartitionConfiguration.getConfiguration( overrides );
 
-        // Add indexed attributes for system partition
-        Set indexedSystemAttrs = new HashSet();
-        indexedSystemAttrs.add( Oid.ALIAS );
-        indexedSystemAttrs.add( Oid.EXISTANCE );
-        indexedSystemAttrs.add( Oid.HIERARCHY );
-        indexedSystemAttrs.add( Oid.NDN );
-        indexedSystemAttrs.add( Oid.ONEALIAS );
-        indexedSystemAttrs.add( Oid.SUBALIAS );
-        indexedSystemAttrs.add( Oid.UPDN );
-        indexedSystemAttrs.add( "objectClass" );
-        systemCfg.setIndexedAttributes( indexedSystemAttrs );
-
-        // Add context entry for system partition
-        Attributes systemEntry = new LockableAttributesImpl();
-        Attribute objectClassAttr = new LockableAttributeImpl( "objectClass" );
-        objectClassAttr.add( "top" );
-        objectClassAttr.add( "organizationalUnit" );
-        systemEntry.put( objectClassAttr );
-        systemEntry.put( "creatorsName", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
-        systemEntry.put( "createTimestamp", DateUtils.getGeneralizedTime() );
-        systemEntry.put( NamespaceTools.getRdnAttribute( DirectoryPartitionNexus.SYSTEM_PARTITION_SUFFIX
),
-            NamespaceTools.getRdnValue( DirectoryPartitionNexus.SYSTEM_PARTITION_SUFFIX )
);
-        systemCfg.setContextEntry( systemEntry );
+            // ---------------------------------------------------------------
+            // Add some attributes w/ some only if they're missing.  Allows 
+            // users to add more attributes to the system namingConext root
+            // ---------------------------------------------------------------
+            
+            Attributes systemEntry = systemCfg.getContextEntry();
+            Attribute objectClassAttr = systemEntry.get( "objectClass" );
+            if ( objectClassAttr == null )
+            {
+                objectClassAttr = new LockableAttributeImpl(  "objectClass" );
+                systemEntry.put( objectClassAttr );
+            }
+            objectClassAttr.add( "top" );
+            objectClassAttr.add( "organizationalUnit" );
+            objectClassAttr.add( "extensibleObject" );
+            systemEntry.put( "creatorsName", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
+            systemEntry.put( "createTimestamp", DateUtils.getGeneralizedTime() );
+            systemEntry.put( NamespaceTools.getRdnAttribute( DirectoryPartitionNexus.SYSTEM_PARTITION_SUFFIX
),
+                NamespaceTools.getRdnValue( DirectoryPartitionNexus.SYSTEM_PARTITION_SUFFIX
) );
+            systemCfg.setContextEntry( systemEntry );
+            
+            // ---------------------------------------------------------------
+            // check a few things to make sure users configured it properly
+            // ---------------------------------------------------------------
 
+            if ( ! systemCfg.getName().equals( "system" ) ) 
+            {
+                throw new ConfigurationException( "System partition has wrong name: should
be 'system'." );
+            }
+            
+            // add all attribute oids of index configs to a hashset
+            Set indices = systemCfg.getIndexedAttributes();
+            Set indexOids = new HashSet();
+            OidRegistry registry = factoryCfg.getGlobalRegistries().getOidRegistry();
+            for ( Iterator ii = indices.iterator(); ii.hasNext(); /**/ )
+            {
+                indexOids.add( registry.getOid( ii.next().toString() ) );
+            }
+            
+            if ( ! indexOids.contains( Oid.ALIAS ) )
+            {
+                indices.add( Oid.ALIAS );
+            }
+            if ( ! indexOids.contains( Oid.EXISTANCE ) )
+            {
+                indices.add( Oid.EXISTANCE );
+            }
+            if ( ! indexOids.contains( Oid.HIERARCHY ) )
+            {
+                indices.add( Oid.HIERARCHY );
+            }
+            if ( ! indexOids.contains( Oid.NDN ) )
+            {
+                indices.add( Oid.NDN );
+            }
+            if ( ! indexOids.contains( Oid.ONEALIAS ) )
+            {
+                indices.add( Oid.ONEALIAS );
+            }
+            if ( ! indexOids.contains( Oid.SUBALIAS ) )
+            {
+                indices.add( Oid.SUBALIAS );
+            }
+            if ( ! indexOids.contains( Oid.UPDN ) )
+            {
+                indices.add( Oid.UPDN );
+            }
+            
+            if ( ! indexOids.contains( registry.getOid( "objectClass" ) ) )
+            {
+                log.warn( "CAUTION: You have not included objectClass as an indexed attribute"
+
+                        "in the system partition configuration.  This will lead to poor "
+
+                        "performance.  The server is automatically adding this index for
you." );
+                indices.add( "objectClass" );
+            }
+        }
+        else
+        {
+            systemCfg = new MutableBTreePartitionConfiguration();
+            systemCfg.setName( "system" );
+            
+            // @TODO need to make this configurable for the system partition
+            systemCfg.setCacheSize( 500 );
+            
+            systemCfg.setSuffix( DirectoryPartitionNexus.SYSTEM_PARTITION_SUFFIX );
+    
+            // Add indexed attributes for system partition
+            Set indexedSystemAttrs = new HashSet();
+            indexedSystemAttrs.add( Oid.ALIAS );
+            indexedSystemAttrs.add( Oid.EXISTANCE );
+            indexedSystemAttrs.add( Oid.HIERARCHY );
+            indexedSystemAttrs.add( Oid.NDN );
+            indexedSystemAttrs.add( Oid.ONEALIAS );
+            indexedSystemAttrs.add( Oid.SUBALIAS );
+            indexedSystemAttrs.add( Oid.UPDN );
+            indexedSystemAttrs.add( "objectClass" );
+            systemCfg.setIndexedAttributes( indexedSystemAttrs );
+    
+            // Add context entry for system partition
+            Attributes systemEntry = new LockableAttributesImpl();
+            Attribute objectClassAttr = new LockableAttributeImpl( "objectClass" );
+            objectClassAttr.add( "top" );
+            objectClassAttr.add( "organizationalUnit" );
+            objectClassAttr.add( "extensibleObject" );
+            systemEntry.put( objectClassAttr );
+            systemEntry.put( "creatorsName", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
+            systemEntry.put( "createTimestamp", DateUtils.getGeneralizedTime() );
+            systemEntry.put( NamespaceTools.getRdnAttribute( DirectoryPartitionNexus.SYSTEM_PARTITION_SUFFIX
),
+                NamespaceTools.getRdnValue( DirectoryPartitionNexus.SYSTEM_PARTITION_SUFFIX
) );
+            systemCfg.setContextEntry( systemEntry );
+        }
+
+        system = new JdbmDirectoryPartition(); // using default implementation.
         system.init( factoryCfg, systemCfg );
+        systemCfg.setContextPartition( system );
         String key = system.getSuffix().toString();
         if ( partitions.containsKey( key ) )
         {

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexConfiguration.java?rev=421288&r1=421287&r2=421288&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexConfiguration.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexConfiguration.java
Wed Jul 12 08:15:30 2006
@@ -53,4 +53,16 @@
     {
         return cacheSize;
     }
+    
+    
+    public int hashCode()
+    {
+        return this.attributeId.hashCode();
+    }
+    
+    
+    public String toString()
+    {
+        return this.attributeId;
+    }
 }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java?rev=421288&r1=421287&r2=421288&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java
Wed Jul 12 08:15:30 2006
@@ -23,6 +23,7 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.configuration.PartitionConfiguration;
 import org.apache.directory.server.core.partition.DirectoryPartition;
 
 
@@ -73,5 +74,19 @@
     public void setCacheSize( int cacheSize )
     {
         super.setCacheSize( cacheSize );
+    }
+    
+    
+    public static MutableBTreePartitionConfiguration getConfiguration( PartitionConfiguration
config ) 
+        throws NamingException
+    {
+        MutableBTreePartitionConfiguration newConfig = new MutableBTreePartitionConfiguration();
+        newConfig.setCacheSize( config.getCacheSize() );
+        newConfig.setContextEntry( config.getContextEntry() );
+        newConfig.setIndexedAttributes( config.getIndexedAttributes() );
+        newConfig.setName( config.getName() );
+        newConfig.setSuffix( config.getSuffix() );
+        newConfig.setSynchOnWrite( false );
+        return newConfig;
     }
 }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java?rev=421288&r1=421287&r2=421288&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
Wed Jul 12 08:15:30 2006
@@ -49,6 +49,7 @@
 import org.apache.directory.server.core.partition.impl.btree.IndexAssertionEnumeration;
 import org.apache.directory.server.core.partition.impl.btree.IndexNotFoundException;
 import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
+import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.schema.AttributeTypeRegistry;
 import org.apache.directory.server.core.schema.OidRegistry;
 
@@ -130,7 +131,15 @@
     public synchronized void init( DirectoryServiceConfiguration factoryCfg, PartitionConfiguration
cfg )
         throws NamingException
     {
-        this.cfg = ( BTreePartitionConfiguration ) cfg;
+        if ( cfg instanceof BTreePartitionConfiguration )
+        {
+            this.cfg = ( BTreePartitionConfiguration ) cfg;
+        }
+        else
+        {
+            this.cfg = MutableBTreePartitionConfiguration.getConfiguration( cfg );
+        }
+        
         oidRegistry = factoryCfg.getGlobalRegistries().getOidRegistry();
         attrRegistry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();
         this.upSuffix = new LdapDN( cfg.getSuffix() );

Modified: directory/branches/apacheds/optimization/server-installers/src/main/installers/server.xml
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/server-installers/src/main/installers/server.xml?rev=421288&r1=421287&r2=421288&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/server-installers/src/main/installers/server.xml
(original)
+++ directory/branches/apacheds/optimization/server-installers/src/main/installers/server.xml
Wed Jul 12 08:15:30 2006
@@ -73,6 +73,11 @@
     <property name="enableKerberos"><value>false</value></property>
     <property name="enableChangePassword"><value>false</value></property>
     <property name="ldapPort"><value>10389</value></property>
+
+    <property name="systemPartitionConfiguration">
+      <ref bean="systemPartitionConfiguration"/>
+    </property>
+
     <property name="contextPartitionConfigurations">
       <set>
         <ref bean="examplePartitionConfiguration"/>
@@ -174,6 +179,77 @@
     </property>
   </bean>
   
+  <!-- use the following partitionConfiguration to override defaults for  -->
+  <!-- the system partition                                               --> 
+  <bean id="systemPartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
+    <property name="name"><value>system</value></property>
+    <property name="cacheSize"><value>10000</value></property>
+    <property name="suffix"><value>ou=system</value></property>
+
+    <!--
+      Synchronization on writes does not wait for synch operations
+      to flush dirty pages.  Writes persist immediately to disk at 
+      a cost to performance with increased data integrity.  Otherwise
+      the periodic synch operation will flush dirty pages using the
+      synchPeriodMillis parameter in the main configuration.
+    -->
+    <property name="synchOnWrite"><value>false</value></property>
+    <property name="indexedAttributes">
+      <set>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.1</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.2</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.3</value></property>
+          <property name="cacheSize"><value>1000000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.4</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.5</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.6</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.7</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>ou</value></property>
+          <property name="cacheSize"><value>50000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>uid</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>objectClass</value></property>
+          <property name="cacheSize"><value>100000</value></property>
+        </bean>
+      </set>
+    </property>
+    <property name="contextEntry">
+      <value>
+        objectClass: top
+        objectClass: organizationalUnit
+        objectClass: extensibleObject
+        ou: system
+      </value>
+    </property>
+  </bean>
+
+
   <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
     <property name="name"><value>example</value></property>
     <property name="cacheSize"><value>10000</value></property>

Modified: directory/branches/apacheds/optimization/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java?rev=421288&r1=421287&r2=421288&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
(original)
+++ directory/branches/apacheds/optimization/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
Wed Jul 12 08:15:30 2006
@@ -24,6 +24,8 @@
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.server.core.configuration.PartitionConfiguration;
+
 /**
  * A mutable version of {@link ServerStartupConfiguration}.
  *
@@ -40,6 +42,30 @@
         super();
     }
 
+
+    public void setSystemPartitionConfiguration( PartitionConfiguration systemPartitionConfiguration
)
+    {
+        super.setSystemPartitionConfiguration( systemPartitionConfiguration );
+    }
+    
+    
+    public void setMaxThreads( int maxThreads )
+    {
+        super.setMaxThreads( maxThreads );
+    }
+    
+    
+    public void setMaxTimeLimit( int maxTimeLimit )
+    {
+        super.setMaxTimeLimit( maxTimeLimit );
+    }
+    
+    
+    public void setMaxSizeLimit( int maxSizeLimit )
+    {
+        super.setMaxSizeLimit( maxSizeLimit );
+    }
+    
 
     public void setSynchPeriodMillis( long synchPeriodMillis )
     {

Modified: directory/branches/apacheds/optimization/server-main/server.xml
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/server-main/server.xml?rev=421288&r1=421287&r2=421288&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/server-main/server.xml (original)
+++ directory/branches/apacheds/optimization/server-main/server.xml Wed Jul 12 08:15:30 2006
@@ -73,6 +73,11 @@
     <property name="enableKerberos"><value>false</value></property>
     <property name="enableChangePassword"><value>false</value></property>
     <property name="ldapPort"><value>10389</value></property>
+
+    <property name="systemPartitionConfiguration">
+      <ref bean="systemPartitionConfiguration"/>
+    </property>
+
     <property name="contextPartitionConfigurations">
       <set>
         <ref bean="examplePartitionConfiguration"/>
@@ -174,6 +179,77 @@
     </property>
   </bean>
   
+  <!-- use the following partitionConfiguration to override defaults for  -->
+  <!-- the system partition                                               --> 
+  <bean id="systemPartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
+    <property name="name"><value>system</value></property>
+    <property name="cacheSize"><value>10000</value></property>
+    <property name="suffix"><value>ou=system</value></property>
+
+    <!--
+      Synchronization on writes does not wait for synch operations
+      to flush dirty pages.  Writes persist immediately to disk at 
+      a cost to performance with increased data integrity.  Otherwise
+      the periodic synch operation will flush dirty pages using the
+      synchPeriodMillis parameter in the main configuration.
+    -->
+    <property name="synchOnWrite"><value>false</value></property>
+    <property name="indexedAttributes">
+      <set>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.1</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.2</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.3</value></property>
+          <property name="cacheSize"><value>1000000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.4</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.5</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.6</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>1.2.6.1.4.1.18060.1.1.1.3.7</value></property>
+          <property name="cacheSize"><value>100</value></property>
+        </bean>
+
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>ou</value></property>
+          <property name="cacheSize"><value>50000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>uid</value></property>
+          <property name="cacheSize"><value>10000</value></property>
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId"><value>objectClass</value></property>
+          <property name="cacheSize"><value>100000</value></property>
+        </bean>
+      </set>
+    </property>
+    <property name="contextEntry">
+      <value>
+        objectClass: top
+        objectClass: organizationalUnit
+        objectClass: extensibleObject
+        ou: system
+      </value>
+    </property>
+  </bean>
+
+
   <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
     <property name="name"><value>example</value></property>
     <property name="cacheSize"><value>10000</value></property>



Mime
View raw message