directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r494286 - in /directory/trunks/apacheds: bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/ core/src/main/java/org/apache/directory/server/core/ core/src/test/java/org/apache/directory/server/core/schema/ core...
Date Tue, 09 Jan 2007 01:02:52 GMT
Author: akarasulu
Date: Mon Jan  8 17:02:51 2007
New Revision: 494286

URL: http://svn.apache.org/viewvc?view=rev&rev=494286
Log:
Making it so we intialize at most one OidRegistry for the entire 
DirectoryService and reuse it.  Eventually we will load all OID's regardless 
of whether the schema is enabled or not.

Modified:
    directory/trunks/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
    directory/trunks/apacheds/mitosis/pom.xml
    directory/trunks/apacheds/schema-extras/src/test/java/org/apache/directory/server/schema/bootstrap/ExtraSchemaLoadTest.java
    directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java
    directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java

Modified: directory/trunks/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
(original)
+++ directory/trunks/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
Mon Jan  8 17:02:51 2007
@@ -52,6 +52,7 @@
 import org.apache.directory.server.schema.bootstrap.SystemSchema;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.ComparatorRegistry;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.server.schema.registries.MatchingRuleRegistry;
 import org.apache.directory.server.schema.registries.NormalizerRegistry;
@@ -605,7 +606,7 @@
         getLog().info( "" );
         
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        registries = new DefaultRegistries( "bootstrap", loader );
+        registries = new DefaultRegistries( "bootstrap", loader, new DefaultOidRegistry()
);
         try
         {
             loader.loadWithDependencies( schemas.values(), registries );

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Mon Jan  8 17:02:51 2007
@@ -58,7 +58,9 @@
 import org.apache.directory.server.schema.bootstrap.SystemSchema;
 import org.apache.directory.server.schema.bootstrap.partition.SchemaPartitionExtractor;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
+import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationNotSupportedException;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
@@ -757,7 +759,8 @@
 
         // setup temporary loader and temp registry 
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        registries = new DefaultRegistries( "bootstrap", loader );
+        OidRegistry oidRegistry = new DefaultOidRegistry();
+        registries = new DefaultRegistries( "bootstrap", loader, oidRegistry );
         
         // load essential bootstrap schemas 
         Set<Schema> bootstrapSchemas = new HashSet<Schema>();
@@ -867,7 +870,7 @@
         // --------------------------------------------------------------------
         
         PartitionSchemaLoader schemaLoader = new PartitionSchemaLoader( schemaPartition,
registries );
-        Registries globalRegistries = new DefaultRegistries( "global", schemaLoader );
+        Registries globalRegistries = new DefaultRegistries( "global", schemaLoader, oidRegistry
);
         schemaLoader.loadEnabled( globalRegistries );
         registries = globalRegistries;
         SerializableComparator.setRegistry( globalRegistries.getComparatorRegistry() );

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
(original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
Mon Jan  8 17:02:51 2007
@@ -30,7 +30,6 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
-import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.DirectoryServiceListener;
@@ -48,6 +47,7 @@
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.bootstrap.SystemSchema;
 import org.apache.directory.server.schema.bootstrap.partition.SchemaPartitionExtractor;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -87,7 +87,7 @@
 
         // setup temporary loader and temp registry 
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        registries = new DefaultRegistries( "bootstrap", loader );
+        registries = new DefaultRegistries( "bootstrap", loader, new DefaultOidRegistry()
);
         
         // load essential bootstrap schemas 
         Set<Schema> bootstrapSchemas = new HashSet<Schema>();

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
(original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
Mon Jan  8 17:02:51 2007
@@ -33,6 +33,7 @@
 import org.apache.directory.server.schema.bootstrap.CoreSchema;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.bootstrap.SystemSchema;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.server.schema.registries.ObjectClassRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
@@ -74,7 +75,7 @@
         super( name );
 
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        registries = new DefaultRegistries( "bootstrap", loader );
+        registries = new DefaultRegistries( "bootstrap", loader, new DefaultOidRegistry()
);
 
         Set<Schema> schemas = new HashSet<Schema>();
         schemas.add( new SystemSchema() );

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
(original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
Mon Jan  8 17:02:51 2007
@@ -33,6 +33,7 @@
 import org.apache.directory.server.schema.bootstrap.CoreSchema;
 import org.apache.directory.server.schema.bootstrap.SystemSchema;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
@@ -53,7 +54,7 @@
     public void setUp() throws Exception
     {
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        registries = new DefaultRegistries( "bootstrap", loader );
+        registries = new DefaultRegistries( "bootstrap", loader, new DefaultOidRegistry()
);
         loader.load( new SystemSchema(), registries );
         loader.load( new ApacheSchema(), registries );
         loader.load( new CoreSchema(), registries );

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java
(original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoaderTest.java
Mon Jan  8 17:02:51 2007
@@ -35,6 +35,7 @@
 import org.apache.directory.server.schema.bootstrap.CoreSchema;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.bootstrap.SystemSchema;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 
@@ -54,7 +55,7 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        registries = new DefaultRegistries( "bootstrap", loader );
+        registries = new DefaultRegistries( "bootstrap", loader, new DefaultOidRegistry()
);
     }
 
 

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
(original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
Mon Jan  8 17:02:51 2007
@@ -32,6 +32,7 @@
 import org.apache.directory.server.schema.bootstrap.CoreSchema;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.bootstrap.SystemSchema;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
@@ -68,7 +69,7 @@
     private void init() throws NamingException
     {
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        DefaultRegistries bsRegistries = new DefaultRegistries( "bootstrap", loader );
+        DefaultRegistries bsRegistries = new DefaultRegistries( "bootstrap", loader, new
DefaultOidRegistry() );
         Set<Schema> schemas = new HashSet<Schema>();
         schemas.add( new SystemSchema() );
         schemas.add( new ApacheSchema() );

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
(original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
Mon Jan  8 17:02:51 2007
@@ -31,6 +31,7 @@
 import org.apache.directory.server.schema.bootstrap.CoreSchema;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.bootstrap.SystemSchema;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
@@ -63,7 +64,7 @@
     private void init() throws NamingException
     {
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        DefaultRegistries bsRegistries = new DefaultRegistries( "bootstrap", loader );
+        DefaultRegistries bsRegistries = new DefaultRegistries( "bootstrap", loader, new
DefaultOidRegistry() );
         Set<Schema> schemas = new HashSet<Schema>();
         schemas.add( new SystemSchema() );
         schemas.add( new ApacheSchema() );

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
(original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
Mon Jan  8 17:02:51 2007
@@ -35,6 +35,7 @@
 import org.apache.directory.server.schema.bootstrap.CoreSchema;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.bootstrap.SystemSchema;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.filter.ExprNode;
@@ -62,7 +63,7 @@
     private void init() throws NamingException
     {
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        DefaultRegistries bsRegistries = new DefaultRegistries( "bootstrap", loader );
+        DefaultRegistries bsRegistries = new DefaultRegistries( "bootstrap", loader, new
DefaultOidRegistry() );
         registries = bsRegistries;
         Set<Schema> schemas = new HashSet<Schema>();
         schemas.add( new SystemSchema() );

Modified: directory/trunks/apacheds/mitosis/pom.xml
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/pom.xml?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/mitosis/pom.xml (original)
+++ directory/trunks/apacheds/mitosis/pom.xml Mon Jan  8 17:02:51 2007
@@ -143,6 +143,7 @@
         <plugin>
           <artifactId>maven-surefire-plugin</artifactId>
           <configuration>
+            <forkMode>pertest</forkMode>
             <excludes>
               <exclude>**/*PTest.java</exclude>
             </excludes>

Modified: directory/trunks/apacheds/schema-extras/src/test/java/org/apache/directory/server/schema/bootstrap/ExtraSchemaLoadTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/schema-extras/src/test/java/org/apache/directory/server/schema/bootstrap/ExtraSchemaLoadTest.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/schema-extras/src/test/java/org/apache/directory/server/schema/bootstrap/ExtraSchemaLoadTest.java
(original)
+++ directory/trunks/apacheds/schema-extras/src/test/java/org/apache/directory/server/schema/bootstrap/ExtraSchemaLoadTest.java
Mon Jan  8 17:02:51 2007
@@ -34,6 +34,7 @@
 import org.apache.directory.server.schema.bootstrap.BootstrapSchemaLoader;
 import org.apache.directory.server.schema.bootstrap.CoreSchema;
 import org.apache.directory.server.schema.bootstrap.SystemSchema;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 
@@ -52,7 +53,7 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        registries = new DefaultRegistries( "bootstrap", new BootstrapSchemaLoader() );
+        registries = new DefaultRegistries( "bootstrap", new BootstrapSchemaLoader(), new
DefaultOidRegistry() );
     }
 
 

Modified: directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java
(original)
+++ directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java
Mon Jan  8 17:02:51 2007
@@ -53,7 +53,7 @@
     private DefaultNameFormRegistry nameFormRegistry;
     private DefaultNormalizerRegistry normalizerRegistry;
     private DefaultObjectClassRegistry objectClassRegistry;
-    private DefaultOidRegistry oidRegistry;
+    private OidRegistry oidRegistry;
     private DefaultSyntaxCheckerRegistry syntaxCheckerRegistry;
     private DefaultSyntaxRegistry syntaxRegistry;
     private Map<String,Schema> byName = new HashMap<String, Schema>();
@@ -61,7 +61,7 @@
     private final String name;
 
 
-    public DefaultRegistries( String name, SchemaLoader schemaLoader )
+    public DefaultRegistries( String name, SchemaLoader schemaLoader, OidRegistry registry
)
     {
         this.name = name;
         this.schemaLoader = schemaLoader;
@@ -71,7 +71,7 @@
                 byName.put( schema.getSchemaName(), schema );
             }
         });
-        oidRegistry = new DefaultOidRegistry();
+        oidRegistry = registry;
         normalizerRegistry = new DefaultNormalizerRegistry();
         comparatorRegistry = new DefaultComparatorRegistry();
         syntaxCheckerRegistry = new DefaultSyntaxCheckerRegistry();

Modified: directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java?view=diff&rev=494286&r1=494285&r2=494286
==============================================================================
--- directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
(original)
+++ directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
Mon Jan  8 17:02:51 2007
@@ -49,6 +49,7 @@
 //import org.apache.directory.server.core.schema.bootstrap.BootstrapSchemaLoader;
 import org.apache.directory.server.schema.bootstrap.BootstrapSchemaLoader;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.server.tools.ToolCommandListener;
 import org.apache.directory.server.tools.execution.BaseToolCommandExecutor;
@@ -76,8 +77,8 @@
     public static final String EXCLUDEDATTRIBUTES_PARAMETER = "excluded-attributes";
     public static final String INCLUDEOPERATIONAL_PARAMETER = "include-operational";
 
-    private DefaultRegistries bootstrapRegistries = new DefaultRegistries( "bootstrap", new
BootstrapSchemaLoader() );
-    //private BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
+    private DefaultRegistries bootstrapRegistries = new DefaultRegistries( "bootstrap", 
+        new BootstrapSchemaLoader(), new DefaultOidRegistry() );
     private Set<String> exclusions = new HashSet<String>();
     private boolean includeOperational = false;
     private String outputFile;



Mime
View raw message