directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r431951 - in /directory/trunks/apacheds: core-unit/src/test/java/org/apache/directory/server/core/jndi/ core/src/main/java/org/apache/directory/server/core/configuration/ core/src/main/java/org/apache/directory/server/core/operational/ serv...
Date Wed, 16 Aug 2006 17:12:40 GMT
Author: akarasulu
Date: Wed Aug 16 10:12:40 2006
New Revision: 431951

URL: http://svn.apache.org/viewvc?rev=431951&view=rev
Log:
Fix for DIRSERVER-704: Values in operational attributes creatorsName and modifiersName contain
OID instead of attribute name

Modified:
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
    directory/trunks/apacheds/server-installers/src/main/installers/server.xml
    directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
    directory/trunks/apacheds/server-main/server.xml

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java?rev=431951&r1=431950&r2=431951&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
(original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
Wed Aug 16 10:12:40 2006
@@ -48,6 +48,11 @@
 {
     protected void setUp() throws Exception
     {
+        if ( this.getName().equals( "testOpAttrDenormalizationOn" ) )
+        {
+            super.configuration.setDenormalizeOpAttrsEnabled( true );
+        }
+        
         super.setUp();
 
         /*
@@ -428,6 +433,54 @@
         assertTrue( "contains ou=testing00,ou=system", map.containsKey( "ou=testing00,ou=system"
) ); 
         assertTrue( "contains ou=testing01,ou=system", map.containsKey( "ou=testing01,ou=system"
) ); 
         assertTrue( "contains ou=testing02,ou=system", map.containsKey( "ou=testing01,ou=system"
) ); 
+    }
+    
+    
+    public void testOpAttrDenormalizationOff() throws Exception
+    {
+        SearchControls controls = new SearchControls();
+        controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
+        controls.setDerefLinkFlag( false );
+        controls.setReturningAttributes( new String[] { "creatorsName" } );
+        sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_PROP, DerefAliasesEnum.NEVERDEREFALIASES.getName()
);
+        HashMap map = new HashMap();
+
+        NamingEnumeration list = sysRoot.search( "", "(ou=testing00)", controls );
+        while ( list.hasMore() )
+        {
+            SearchResult result = ( SearchResult ) list.next();
+            map.put( result.getName(), result.getAttributes() );
+        }
+
+        assertEquals( "Expected number of results returned was incorrect!", 1, map.size()
);
+        assertTrue( map.containsKey( "ou=testing00,ou=system" ) );
+        Attributes attrs = ( Attributes ) map.get( "ou=testing00,ou=system" );
+        assertEquals( "normalized creator's name", "0.9.2342.19200300.100.1.1=admin,2.5.4.11=system",

+            attrs.get( "creatorsName" ).get() );
+    }
+
+
+    public void testOpAttrDenormalizationOn() throws Exception
+    {
+        SearchControls controls = new SearchControls();
+        controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
+        controls.setDerefLinkFlag( false );
+        controls.setReturningAttributes( new String[] { "creatorsName" } );
+        sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_PROP, DerefAliasesEnum.NEVERDEREFALIASES.getName()
);
+        HashMap map = new HashMap();
+
+        NamingEnumeration list = sysRoot.search( "", "(ou=testing00)", controls );
+        while ( list.hasMore() )
+        {
+            SearchResult result = ( SearchResult ) list.next();
+            map.put( result.getName(), result.getAttributes() );
+        }
+
+        assertEquals( "Expected number of results returned was incorrect!", 1, map.size()
);
+        assertTrue( map.containsKey( "ou=testing00,ou=system" ) );
+        Attributes attrs = ( Attributes ) map.get( "ou=testing00,ou=system" );
+        assertEquals( "normalized creator's name", "uid=admin,ou=system", 
+            attrs.get( "creatorsName" ).get() );
     }
 
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java?rev=431951&r1=431950&r2=431951&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
Wed Aug 16 10:12:40 2006
@@ -143,4 +143,10 @@
     {
         super.setExitVmOnShutdown( exitVmOnShutdown );
     }
+    
+    
+    public void setDenormalizeOpAttrsEnabled( boolean denormalizeOpAttrsEnabled )
+    {
+        super.setDenormalizeOpAttrsEnabled( denormalizeOpAttrsEnabled );
+    }
 }

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java?rev=431951&r1=431950&r2=431951&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
Wed Aug 16 10:12:40 2006
@@ -73,6 +73,7 @@
     private boolean shutdownHookEnabled = true; // allow by default
     private boolean allowAnonymousAccess = true; // allow by default
     private boolean accessControlEnabled = false; // turn off by default
+    private boolean denormalizeOpAttrsEnabled = false;
     private int maxThreads = MAX_THREADS_DEFAULT; // set to default value
     private int maxSizeLimit = MAX_SIZE_LIMIT_DEFAULT; // set to default value
     private int maxTimeLimit = MAX_TIME_LIMIT_DEFAULT; // set to default value (milliseconds)
@@ -515,5 +516,17 @@
     public PartitionConfiguration getSystemPartitionConfiguration()
     {
         return systemPartitionConfiguration;
+    }
+
+
+    public boolean isDenormalizeOpAttrsEnabled()
+    {
+        return denormalizeOpAttrsEnabled;
+    }
+    
+    
+    protected void setDenormalizeOpAttrsEnabled( boolean denormalizeOpAttrsEnabled )
+    {
+        this.denormalizeOpAttrsEnabled = denormalizeOpAttrsEnabled;
     }
 }

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java?rev=431951&r1=431950&r2=431951&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
Wed Aug 16 10:12:40 2006
@@ -18,11 +18,13 @@
 
 
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.Map;
 
 import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.BasicAttributes;
@@ -45,8 +47,11 @@
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
+import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.DateUtils;
+import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 
 
 /**
@@ -60,6 +65,20 @@
  */
 public class OperationalAttributeService extends BaseInterceptor
 {
+    private final SearchResultFilter DENORMALIZING_SEARCH_FILTER = new SearchResultFilter()
+    {
+        public boolean accept( Invocation invocation, SearchResult result, SearchControls
controls ) 
+            throws NamingException
+        {
+            if ( controls.getReturningAttributes() != null )
+            {
+                return filterDenormalized( result.getAttributes() );
+            }
+            
+            return true;
+        }
+    };
+
     /**
      * the database search result filter to register with filter service
      */
@@ -84,6 +103,8 @@
 
     private AttributeTypeRegistry registry;
 
+    private boolean isDenormalizeOpAttrsEnabled;
+
 
     /**
      * Creates the operational attribute management service interceptor.
@@ -97,6 +118,7 @@
     {
         nexus = factoryCfg.getPartitionNexus();
         registry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();
+        isDenormalizeOpAttrsEnabled = factoryCfg.getStartupConfiguration().isDenormalizeOpAttrsEnabled();
     }
 
 
@@ -262,6 +284,11 @@
         NamingEnumeration e = nextInterceptor.search( base, env, filter, searchCtls );
         if ( searchCtls.getReturningAttributes() != null )
         {
+            if ( isDenormalizeOpAttrsEnabled )
+            {
+                return new SearchResultFilteringEnumeration( e, searchCtls, invocation, DENORMALIZING_SEARCH_FILTER
);
+            }
+                
             return e;
         }
 
@@ -331,8 +358,84 @@
             }
         }
 
+        denormalizeEntryOpAttrs( entry );
+        
         // do nothing past here since this explicity specifies which
         // attributes to include - backends will automatically populate
         // with right set of attributes using ids array
+    }
+
+    
+    public void denormalizeEntryOpAttrs( Attributes entry ) throws NamingException
+    {
+        if ( isDenormalizeOpAttrsEnabled )
+        {
+            AttributeType type = registry.lookup( "creatorsName" );
+            Attribute attr = AttributeUtils.getAttribute( entry, type );
+
+            if ( attr != null )
+            {
+                LdapDN creatorsName = new LdapDN( ( String ) attr.get() );
+                attr.set( 0, denormalizeTypes( creatorsName ).getUpName() );
+            }
+            
+            type = null;
+            type = registry.lookup( "modifiersName" );
+            attr = null;
+            attr = AttributeUtils.getAttribute( entry, type );
+            if ( attr != null )
+            {
+                LdapDN modifiersName = new LdapDN( ( String ) attr.get() );
+                attr.set( 0, denormalizeTypes( modifiersName ).getUpName() );
+            }
+        }
+    }
+
+    
+    /**
+     * Does not create a new DN but alters existing DN by using the first
+     * short name for an attributeType definition.
+     */
+    public LdapDN denormalizeTypes( LdapDN dn ) throws NamingException
+    {
+        LdapDN newDn = new LdapDN();
+        
+        for ( int ii = 0; ii < dn.size(); ii++ )
+        {
+            Rdn rdn = dn.getRdn( ii );
+            if ( rdn.size() == 0 )
+            {
+                newDn.add( new Rdn() );
+                continue;
+            }
+            else if ( rdn.size() == 1 )
+            {
+                newDn.add( new Rdn( registry.lookup( rdn.getType() ).getName(), rdn.getAtav().getValue()
) );
+                continue;
+            }
+
+            // below we only process multi-valued rdns
+            StringBuffer buf = new StringBuffer();
+            for ( Iterator jj = rdn.iterator(); jj.hasNext(); /**/ )
+            {
+                AttributeTypeAndValue atav = ( AttributeTypeAndValue ) jj.next();
+                String type = registry.lookup( rdn.getType() ).getName();
+                buf.append( type ).append( '=' ).append( atav.getValue() );
+                if ( jj.hasNext() )
+                {
+                    buf.append( '+' );
+                }
+            }
+            newDn.add( new Rdn(buf.toString()) );
+        }
+        
+        return newDn;
+    }
+
+
+    private boolean filterDenormalized( Attributes entry ) throws NamingException
+    {
+        denormalizeEntryOpAttrs( entry );
+        return true;
     }
 }

Modified: directory/trunks/apacheds/server-installers/src/main/installers/server.xml
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-installers/src/main/installers/server.xml?rev=431951&r1=431950&r2=431951&view=diff
==============================================================================
--- directory/trunks/apacheds/server-installers/src/main/installers/server.xml (original)
+++ directory/trunks/apacheds/server-installers/src/main/installers/server.xml Wed Aug 16
10:12:40 2006
@@ -72,6 +72,23 @@
     <property name="enableNtp"><value>false</value></property>
     <property name="enableKerberos"><value>false</value></property>
     <property name="enableChangePassword"><value>false</value></property>
+
+    <!--
+       It's more efficient to keep this feature turned off but you may not like
+       having the creatorsName and modifiersName contain OIDs instead of short
+       attributeType names instead.  So if you want the creatorsName to change
+       from the normalized form which is the internal representation of 
+           
+            '0.9.2342.19200300.100.1.1=admin,2.5.4.11=system'
+       
+       to a more human readabile form like:
+
+            'uid=admin,ou=system'
+
+       then set this property to true.
+    -->
+    <property name="denormalizeOpAttrsEnabled"><value>false</value></property>
+
     <property name="ldapPort"><value>10389</value></property>
 
     <property name="systemPartitionConfiguration">
@@ -104,7 +121,6 @@
       <list>
         <bean class="org.apache.directory.server.ldap.support.extended.GracefulShutdownHandler"/>
         <bean class="org.apache.directory.server.ldap.support.extended.LaunchDiagnosticUiHandler"/>
-        <bean class="org.apache.directory.server.ldap.support.extended.StoredProcedureExtendedOperationHandler"/>
       </list>
     </property>
 
@@ -176,12 +192,6 @@
             <bean class="org.apache.directory.server.core.event.EventService" />
           </property>
         </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>triggerService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.trigger.TriggerService" />
-          </property>
-        </bean>
       </list>
     </property>
   </bean>
@@ -190,7 +200,7 @@
   <!-- 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="cacheSize"><value>100</value></property>
     <property name="suffix"><value>ou=system</value></property>
 
     <!-- the optimizer is enabled by default but may not always be what     -->
@@ -204,49 +214,49 @@
       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="synchOnWrite"><value>true</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>
+          <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.2</value></property>
-          <property name="cacheSize"><value>10000</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.3</value></property>
-          <property name="cacheSize"><value>1000000</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.4</value></property>
-          <property name="cacheSize"><value>10000</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.5</value></property>
-          <property name="cacheSize"><value>100</value></property>
+          <property name="cacheSize"><value>10</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>
+          <property name="cacheSize"><value>10</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>
+          <property name="cacheSize"><value>10</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>
+          <property name="cacheSize"><value>100</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>
+          <property name="cacheSize"><value>100</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>
+          <property name="cacheSize"><value>100</value></property>
         </bean>
       </set>
     </property>
@@ -263,7 +273,7 @@
 
   <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
     <property name="name"><value>example</value></property>
-    <property name="cacheSize"><value>10000</value></property>
+    <property name="cacheSize"><value>100</value></property>
     <property name="suffix"><value>dc=example,dc=com</value></property>
 
     <!-- the optimizer is enabled by default but may not always be what     -->
@@ -277,57 +287,57 @@
       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="synchOnWrite"><value>true</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>
+          <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.2</value></property>
-          <property name="cacheSize"><value>10000</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.3</value></property>
-          <property name="cacheSize"><value>1000000</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.4</value></property>
-          <property name="cacheSize"><value>10000</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.5</value></property>
-          <property name="cacheSize"><value>100</value></property>
+          <property name="cacheSize"><value>10</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>
+          <property name="cacheSize"><value>10</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>
+          <property name="cacheSize"><value>10</value></property>
         </bean>
 
         <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
           <property name="attributeId"><value>dc</value></property>
-          <property name="cacheSize"><value>1000</value></property>
+          <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>
+          <property name="cacheSize"><value>100</value></property>
         </bean>
         <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
           <property name="attributeId"><value>krb5PrincipalName</value></property>
-          <property name="cacheSize"><value>10000</value></property>
+          <property name="cacheSize"><value>100</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>
+          <property name="cacheSize"><value>100</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>
+          <property name="cacheSize"><value>100</value></property>
         </bean>
       </set>
     </property>

Modified: directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java?rev=431951&r1=431950&r2=431951&view=diff
==============================================================================
--- directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
(original)
+++ directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
Wed Aug 16 10:12:40 2006
@@ -84,6 +84,12 @@
         super.setAllowAnonymousAccess( arg0 );
     }
 
+    
+    public void setDenormalizeOpAttrsEnabled( boolean denormalizeOpAttrsEnabled )
+    {
+        super.setDenormalizeOpAttrsEnabled( denormalizeOpAttrsEnabled );
+    }
+    
 
     public void setAuthenticatorConfigurations( Set arg0 )
     {

Modified: directory/trunks/apacheds/server-main/server.xml
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-main/server.xml?rev=431951&r1=431950&r2=431951&view=diff
==============================================================================
--- directory/trunks/apacheds/server-main/server.xml (original)
+++ directory/trunks/apacheds/server-main/server.xml Wed Aug 16 10:12:40 2006
@@ -72,6 +72,23 @@
     <property name="enableNtp"><value>false</value></property>
     <property name="enableKerberos"><value>false</value></property>
     <property name="enableChangePassword"><value>false</value></property>
+
+    <!--
+       It's more efficient to keep this feature turned off but you may not like
+       having the creatorsName and modifiersName contain OIDs instead of short
+       attributeType names instead.  So if you want the creatorsName to change
+       from the normalized form which is the internal representation of 
+           
+            '0.9.2342.19200300.100.1.1=admin,2.5.4.11=system'
+       
+       to a more human readabile form like:
+
+            'uid=admin,ou=system'
+
+       then set this property to true.
+    -->
+    <property name="denormalizeOpAttrsEnabled"><value>false</value></property>
+
     <property name="ldapPort"><value>10389</value></property>
 
     <property name="systemPartitionConfiguration">
@@ -104,7 +121,6 @@
       <list>
         <bean class="org.apache.directory.server.ldap.support.extended.GracefulShutdownHandler"/>
         <bean class="org.apache.directory.server.ldap.support.extended.LaunchDiagnosticUiHandler"/>
-        <bean class="org.apache.directory.server.ldap.support.extended.StoredProcedureExtendedOperationHandler"/>
       </list>
     </property>
 
@@ -176,13 +192,6 @@
             <bean class="org.apache.directory.server.core.event.EventService" />
           </property>
         </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>triggerService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.trigger.TriggerService" />
-          </property>
-        </bean>
-
       </list>
     </property>
   </bean>
@@ -191,12 +200,12 @@
   <!-- 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="cacheSize"><value>100</value></property>
     <property name="suffix"><value>ou=system</value></property>
 
     <!-- the optimizer is enabled by default but may not always be what     -->
     <!-- you want if your queries are really simple                         -->
-    <property name="enableOptimizer"><value>true</value></property>
+    <property name="optimizerEnabled"><value>true</value></property>
 
     <!--
       Synchronization on writes does not wait for synch operations
@@ -205,49 +214,49 @@
       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="synchOnWrite"><value>true</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>
+          <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.2</value></property>
-          <property name="cacheSize"><value>10000</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.3</value></property>
-          <property name="cacheSize"><value>1000000</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.4</value></property>
-          <property name="cacheSize"><value>10000</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.5</value></property>
-          <property name="cacheSize"><value>100</value></property>
+          <property name="cacheSize"><value>10</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>
+          <property name="cacheSize"><value>10</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>
+          <property name="cacheSize"><value>10</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>
+          <property name="cacheSize"><value>100</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>
+          <property name="cacheSize"><value>100</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>
+          <property name="cacheSize"><value>100</value></property>
         </bean>
       </set>
     </property>
@@ -264,12 +273,12 @@
 
   <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
     <property name="name"><value>example</value></property>
-    <property name="cacheSize"><value>10000</value></property>
+    <property name="cacheSize"><value>100</value></property>
     <property name="suffix"><value>dc=example,dc=com</value></property>
 
     <!-- the optimizer is enabled by default but may not always be what     -->
     <!-- you want if your queries are really simple                         -->
-    <property name="enableOptimizer"><value>true</value></property>
+    <property name="optimizerEnabled"><value>true</value></property>
 
     <!--
       Synchronization on writes does not wait for synch operations
@@ -278,57 +287,57 @@
       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="synchOnWrite"><value>true</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>
+          <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.2</value></property>
-          <property name="cacheSize"><value>10000</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.3</value></property>
-          <property name="cacheSize"><value>1000000</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.4</value></property>
-          <property name="cacheSize"><value>10000</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.5</value></property>
-          <property name="cacheSize"><value>100</value></property>
+          <property name="cacheSize"><value>10</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>
+          <property name="cacheSize"><value>10</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>
+          <property name="cacheSize"><value>10</value></property>
         </bean>
 
         <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
           <property name="attributeId"><value>dc</value></property>
-          <property name="cacheSize"><value>1000</value></property>
+          <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>
+          <property name="cacheSize"><value>100</value></property>
         </bean>
         <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
           <property name="attributeId"><value>krb5PrincipalName</value></property>
-          <property name="cacheSize"><value>10000</value></property>
+          <property name="cacheSize"><value>100</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>
+          <property name="cacheSize"><value>100</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>
+          <property name="cacheSize"><value>100</value></property>
         </bean>
       </set>
     </property>



Mime
View raw message