directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r759537 - /directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Date Sat, 28 Mar 2009 18:16:23 GMT
Author: akarasulu
Date: Sat Mar 28 18:16:23 2009
New Revision: 759537

URL: http://svn.apache.org/viewvc?rev=759537&view=rev
Log:
for now just leaving the dependency on JDBM based Partition - later with OSGi or other techniques
we can remove this dependency and replace it with a dependency on the interface.

Modified:
    directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java

Modified: directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=759537&r1=759536&r2=759537&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Sat Mar 28 18:16:23 2009
@@ -51,6 +51,7 @@
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
@@ -60,7 +61,6 @@
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeIdentifierException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
@@ -360,17 +360,19 @@
                 throw new ConfigurationException( "System partition has wrong name: should
be 'system' not '"
                         + override.getId() + "'." );
             }
-            
-            system = override;
         }
         else
         {
-            throw new LdapConfigurationException( "No system partition found" );
+            system = new JdbmPartition();
+            system.setId( "system" );
+            system.setCacheSize( 500 );
+            system.setSuffix( ServerDNConstants.SYSTEM_DN );
+//            throw new LdapConfigurationException( "No system partition found" );
         }
 
+        system = override;
         system.init( directoryService );
         
-        
         // Add root context entry for system partition
         LdapDN systemSuffixDn = new LdapDN( ServerDNConstants.SYSTEM_DN );
         systemSuffixDn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping()
);



Mime
View raw message