You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2010/01/06 19:27:19 UTC

svn commit: r896599 [12/30] - in /directory/apacheds/trunk: ./ avl-partition/ avl-partition/src/ avl-partition/src/main/ avl-partition/src/main/java/ avl-partition/src/main/java/org/ avl-partition/src/main/java/org/apache/ avl-partition/src/main/java/o...

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java Wed Jan  6 18:26:43 2010
@@ -20,71 +20,76 @@
 package org.apache.directory.server.core.schema;
 
 
-import jdbm.helper.IntegerComparator;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.TimeZone;
+
+import javax.naming.Context;
+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;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+import javax.naming.ldap.LdapContext;
+
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
-import org.apache.directory.server.core.integ.CiRunner;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.exception.LdapNameAlreadyBoundException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.LdapSyntax;
+import org.apache.directory.shared.ldap.schema.MatchingRule;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.schema.comparators.BooleanComparator;
+import org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory;
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimNormalizer;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.schema.parsers.ComparatorDescription;
-import org.apache.directory.shared.ldap.schema.parsers.ComparatorDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescription;
+import org.apache.directory.shared.ldap.schema.parsers.LdapComparatorDescription;
+import org.apache.directory.shared.ldap.schema.parsers.LdapComparatorDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescription;
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.schema.parsers.NormalizerDescription;
 import org.apache.directory.shared.ldap.schema.parsers.NormalizerDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescription;
 import org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.schema.syntaxes.AcceptAllSyntaxChecker;
+import org.apache.directory.shared.ldap.schema.syntaxCheckers.OctetStringSyntaxChecker;
 import org.apache.directory.shared.ldap.util.Base64;
 import org.apache.directory.shared.ldap.util.DateUtils;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import javax.naming.Context;
-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;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.ModificationItem;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-import javax.naming.ldap.LdapContext;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.TimeZone;
-
 
 /**
  * An integration test class for performing various operations on the 
@@ -93,8 +98,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-public class SubschemaSubentryIT 
+@RunWith ( FrameworkRunner.class )
+@CreateDS( name="SubschemaSubentryIT-class" )
+public class SubschemaSubentryIT extends AbstractLdapTestUnit 
 {
     private static final String GLOBAL_SUBSCHEMA_DN = "cn=schema";
     private static final String SUBSCHEMA_SUBENTRY = "subschemaSubentry";
@@ -103,8 +109,8 @@
         new SyntaxCheckerDescriptionSchemaParser();
     private static final AttributeTypeDescriptionSchemaParser ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER =
         new AttributeTypeDescriptionSchemaParser();
-    private ComparatorDescriptionSchemaParser comparatorDescriptionSchemaParser =
-        new ComparatorDescriptionSchemaParser();
+    private LdapComparatorDescriptionSchemaParser comparatorDescriptionSchemaParser =
+        new LdapComparatorDescriptionSchemaParser();
     private NormalizerDescriptionSchemaParser normalizerDescriptionSchemaParser =
         new NormalizerDescriptionSchemaParser();
     private LdapSyntaxDescriptionSchemaParser ldapSyntaxDescriptionSchemaParser =
@@ -114,9 +120,6 @@
     private ObjectClassDescriptionSchemaParser objectClassDescriptionSchemaParser =
         new ObjectClassDescriptionSchemaParser();
 
-
-    public static DirectoryService service;
-
     
     /**
      * Make sure the global subschemaSubentry is where it is expected to be.
@@ -227,7 +230,7 @@
     // -----------------------------------------------------------------------
 
     
-    private void checkSyntaxCheckerPresent( String oid, String schemaName, boolean isPresent ) throws Exception
+    private void checkSyntaxCheckerPresent( SchemaManager schemaManager, String oid, String schemaName, boolean isPresent ) throws Exception
     {
         // -------------------------------------------------------------------
         // check first to see if it is present in the subschemaSubentry
@@ -236,9 +239,11 @@
         Attributes attrs = getSubschemaSubentryAttributes();
         Attribute attrTypes = attrs.get( "syntaxCheckers" );
         SyntaxCheckerDescription syntaxCheckerDescription = null; 
-        for ( int ii = 0; ii < attrTypes.size(); ii++ )
+
+        for ( int i = 0; i < attrTypes.size(); i++ )
         {
-            String desc = ( String ) attrTypes.get( ii );
+            String desc = ( String ) attrTypes.get( i );
+            
             if ( desc.indexOf( oid ) != -1 )
             {
                 syntaxCheckerDescription = SYNTAX_CHECKER_DESCRIPTION_SCHEMA_PARSER.parseSyntaxCheckerDescription( desc );
@@ -249,7 +254,7 @@
         if ( isPresent )
         {
             assertNotNull( syntaxCheckerDescription );
-            assertEquals( oid, syntaxCheckerDescription.getNumericOid() );
+            assertEquals( oid, syntaxCheckerDescription.getOid() );
         }
         else
         {
@@ -266,12 +271,12 @@
         {
             attrs = getSchemaContext( service ).getAttributes( "m-oid=" + oid + ",ou=syntaxCheckers,cn=" + schemaName );
             assertNotNull( attrs );
-            SchemaEntityFactory factory = new SchemaEntityFactory( service.getRegistries() );
+            SchemaEntityFactory factory = new SchemaEntityFactory();
             
-            ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getRegistries() );
+            ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getSchemaManager() );
 
-            SyntaxChecker syntaxChecker = factory.getSyntaxChecker( serverEntry, service.getRegistries() );
-            assertEquals( oid, syntaxChecker.getSyntaxOid() );
+            SyntaxChecker syntaxChecker = factory.getSyntaxChecker( schemaManager, serverEntry, service.getSchemaManager().getRegistries(), schemaName );
+            assertEquals( oid, syntaxChecker.getOid() );
         }
         else
         {
@@ -294,11 +299,11 @@
 
         if ( isPresent )
         {
-            assertTrue( service.getRegistries().getSyntaxCheckerRegistry().hasSyntaxChecker( oid ) );
+            assertTrue( service.getSchemaManager().getSyntaxCheckerRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getSyntaxCheckerRegistry().hasSyntaxChecker( oid ) );
+            assertFalse( service.getSchemaManager().getSyntaxCheckerRegistry().contains( oid ) );
         }
     }
 
@@ -318,9 +323,9 @@
         
         // ( 1.3.6.1.4.1.18060.0.4.0.2.10000 DESC 'bogus desc' FQCN org.foo.Bar BYTECODE 14561234 )
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10000 DESC 'bogus desc' FQCN " 
-            + AcceptAllSyntaxChecker.class.getName() + " X-SCHEMA 'nis' )" );
+            + OctetStringSyntaxChecker.class.getName() + " X-SCHEMA 'nis' )" );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10001 DESC 'bogus desc' FQCN " 
-            + AcceptAllSyntaxChecker.class.getName() + " X-SCHEMA 'nis' )" );
+            + OctetStringSyntaxChecker.class.getName() + " X-SCHEMA 'nis' )" );
 
         // -------------------------------------------------------------------
         // add and check
@@ -328,8 +333,8 @@
         
         // 2nd change
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", true );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", true );
 
         // -------------------------------------------------------------------
         // remove and check
@@ -337,8 +342,8 @@
 
         // 3rd change
         modify( DirContext.REMOVE_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", false );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", false );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", false );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", false );
         
         // -------------------------------------------------------------------
         // test failure to replace
@@ -359,12 +364,12 @@
         // -------------------------------------------------------------------
         
         descriptions.clear();
-        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' FQCN DummySyntaxChecker BYTECODE " 
+        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' FQCN org.apache.directory.shared.ldap.schema.syntaxCheckers.DummySyntaxChecker BYTECODE " 
             +  getByteCode( "DummySyntaxChecker.bytecode" ) + " X-SCHEMA 'nis' )" );
 
         // 4th change
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
 
         // -------------------------------------------------------------------
         // check remove
@@ -372,18 +377,18 @@
 
         // 5th change
         modify( DirContext.REMOVE_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", false );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", false );
 
         // -------------------------------------------------------------------
         // check add no schema info
         // -------------------------------------------------------------------
         descriptions.clear();
-        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' FQCN DummySyntaxChecker BYTECODE " 
+        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' FQCN org.apache.directory.shared.ldap.schema.syntaxCheckers.DummySyntaxChecker BYTECODE " 
             +  getByteCode( "DummySyntaxChecker.bytecode" ) + " )" );
 
         // 6th change
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "other", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10002", "other", true );
 
         // after a total of 6 changes 
         if ( service.getChangeLog().getLatest() != null )
@@ -407,10 +412,12 @@
         
         Attributes attrs = getSubschemaSubentryAttributes();
         Attribute attrTypes = attrs.get( "comparators" );
-        ComparatorDescription comparatorDescription = null; 
+        LdapComparatorDescription comparatorDescription = null;
+        
         for ( int ii = 0; ii < attrTypes.size(); ii++ )
         {
             String desc = ( String ) attrTypes.get( ii );
+            
             if ( desc.indexOf( oid ) != -1 )
             {
                 comparatorDescription = comparatorDescriptionSchemaParser.parseComparatorDescription( desc );
@@ -421,7 +428,7 @@
         if ( isPresent )
         {
             assertNotNull( comparatorDescription );
-            assertEquals( oid, comparatorDescription.getNumericOid() );
+            assertEquals( oid, comparatorDescription.getOid() );
         }
         else
         {
@@ -460,11 +467,11 @@
 
         if ( isPresent )
         {
-            assertTrue( service.getRegistries().getComparatorRegistry().hasComparator( oid ) );
+            assertTrue( service.getSchemaManager().getComparatorRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getComparatorRegistry().hasComparator( oid ) );
+            assertFalse( service.getSchemaManager().getComparatorRegistry().contains( oid ) );
         }
     }
     
@@ -481,17 +488,17 @@
         enableSchema( "nis" );
         List<String> descriptions = new ArrayList<String>();
         
-        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10000 DESC 'bogus desc' FQCN " 
-            + IntegerComparator.class.getName() + " X-SCHEMA 'nis' )" );
+        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' FQCN " 
+            + BooleanComparator.class.getName() + " X-SCHEMA 'nis' )" );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10001 DESC 'bogus desc' FQCN " 
-            + IntegerComparator.class.getName() + " X-SCHEMA 'nis' )" );
+            + BooleanComparator.class.getName() + " X-SCHEMA 'nis' )" );
 
         // -------------------------------------------------------------------
         // add and check
         // -------------------------------------------------------------------
         
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "comparators" );
-        checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", true );
+        checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
         checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", true );
 
         // -------------------------------------------------------------------
@@ -499,7 +506,7 @@
         // -------------------------------------------------------------------
         
         modify( DirContext.REMOVE_ATTRIBUTE, descriptions, "comparators" );
-        checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", false );
+        checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", false );
         checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", false );
         
         // -------------------------------------------------------------------
@@ -521,29 +528,29 @@
         // -------------------------------------------------------------------
         
         descriptions.clear();
-        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' FQCN DummyComparator BYTECODE " 
+        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.0.1.100000 DESC 'bogus desc' FQCN org.apache.directory.shared.ldap.schema.comparators.DummyComparator BYTECODE " 
             +  getByteCode( "DummyComparator.bytecode" ) + " X-SCHEMA 'nis' )" );
 
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "comparators" );
-        checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
+        checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.0.1.100000", "nis", true );
 
         // -------------------------------------------------------------------
         // check remove with valid bytecode
         // -------------------------------------------------------------------
         
         modify( DirContext.REMOVE_ATTRIBUTE, descriptions, "comparators" );
-        checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", false );
+        checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.0.1.100000", "nis", false );
 
         // -------------------------------------------------------------------
         // check add no schema info
         // -------------------------------------------------------------------
         
         descriptions.clear();
-        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' FQCN DummyComparator BYTECODE " 
+        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.0.1.100000 DESC 'bogus desc' FQCN org.apache.directory.shared.ldap.schema.comparators.DummyComparator BYTECODE " 
             +  getByteCode( "DummyComparator.bytecode" ) + " )" );
 
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "comparators" );
-        checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "other", true );
+        checkComparatorPresent( "1.3.6.1.4.1.18060.0.4.0.1.100000", "other", true );
     }
 
     
@@ -561,9 +568,11 @@
         Attributes attrs = getSubschemaSubentryAttributes();
         Attribute attrTypes = attrs.get( "normalizers" );
         NormalizerDescription normalizerDescription = null; 
-        for ( int ii = 0; ii < attrTypes.size(); ii++ )
+        
+        for ( int i = 0; i < attrTypes.size(); i++ )
         {
-            String desc = ( String ) attrTypes.get( ii );
+            String desc = ( String ) attrTypes.get( i );
+            
             if ( desc.indexOf( oid ) != -1 )
             {
                 normalizerDescription = normalizerDescriptionSchemaParser.parseNormalizerDescription( desc );
@@ -574,7 +583,7 @@
         if ( isPresent )
         {
             assertNotNull( normalizerDescription );
-            assertEquals( oid, normalizerDescription.getNumericOid() );
+            assertEquals( oid, normalizerDescription.getOid() );
         }
         else
         {
@@ -613,11 +622,11 @@
         
         if ( isPresent ) 
         { 
-            assertTrue( service.getRegistries().getNormalizerRegistry().hasNormalizer( oid ) );
+            assertTrue( service.getSchemaManager().getNormalizerRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getNormalizerRegistry().hasNormalizer( oid ) );
+            assertFalse( service.getSchemaManager().getNormalizerRegistry().contains( oid ) );
         }
     }
     
@@ -634,7 +643,7 @@
         enableSchema( "nis" );
         List<String> descriptions = new ArrayList<String>();
         
-        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10000 DESC 'bogus desc' FQCN " 
+        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' FQCN " 
             + DeepTrimNormalizer.class.getName() + " X-SCHEMA 'nis' )" );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10001 DESC 'bogus desc' FQCN " 
             + DeepTrimNormalizer.class.getName() + " X-SCHEMA 'nis' )" );
@@ -644,7 +653,7 @@
         // -------------------------------------------------------------------
         
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "normalizers" );
-        checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", true );
+        checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
         checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", true );
 
         // -------------------------------------------------------------------
@@ -652,7 +661,7 @@
         // -------------------------------------------------------------------
         
         modify( DirContext.REMOVE_ATTRIBUTE, descriptions, "normalizers" );
-        checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", false );
+        checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", false );
         checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", false );
         
         // -------------------------------------------------------------------
@@ -674,29 +683,29 @@
         // -------------------------------------------------------------------
         
         descriptions.clear();
-        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' FQCN DummyNormalizer BYTECODE " 
+        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.0.1.100000 DESC 'bogus desc' FQCN org.apache.directory.shared.ldap.schema.normalizers.DummyNormalizer BYTECODE " 
             +  getByteCode( "DummyNormalizer.bytecode" ) + " X-SCHEMA 'nis' )" );
 
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "normalizers" );
-        checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
+        checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.0.1.100000", "nis", true );
 
         // -------------------------------------------------------------------
         // check remove with valid bytecode
         // -------------------------------------------------------------------
         
         modify( DirContext.REMOVE_ATTRIBUTE, descriptions, "normalizers" );
-        checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", false );
+        checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.0.1.100000", "nis", false );
 
         // -------------------------------------------------------------------
         // check add no schema info
         // -------------------------------------------------------------------
         
         descriptions.clear();
-        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' FQCN DummyNormalizer BYTECODE " 
+        descriptions.add( "( 1.3.6.1.4.1.18060.0.4.0.1.100000 DESC 'bogus desc' FQCN org.apache.directory.shared.ldap.schema.normalizers.DummyNormalizer BYTECODE " 
             +  getByteCode( "DummyNormalizer.bytecode" ) + " )" );
 
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "normalizers" );
-        checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "other", true );
+        checkNormalizerPresent( "1.3.6.1.4.1.18060.0.4.0.1.100000", "other", true );
     }
 
     
@@ -713,25 +722,27 @@
         
         Attributes attrs = getSubschemaSubentryAttributes();
         Attribute attrTypes = attrs.get( "ldapSyntaxes" );
-        LdapSyntaxDescription syntaxDescription = null; 
+        LdapSyntax ldapSyntax = null;
+        
         for ( int ii = 0; ii < attrTypes.size(); ii++ )
         {
             String desc = ( String ) attrTypes.get( ii );
+            
             if ( desc.indexOf( oid ) != -1 )
             {
-                syntaxDescription = ldapSyntaxDescriptionSchemaParser.parseLdapSyntaxDescription( desc );
+                ldapSyntax = ldapSyntaxDescriptionSchemaParser.parseLdapSyntaxDescription( desc );
                 break;
             }
         }
      
         if ( isPresent )
         {
-            assertNotNull( syntaxDescription );
-            assertEquals( oid, syntaxDescription.getNumericOid() );
+            assertNotNull( ldapSyntax );
+            assertEquals( oid, ldapSyntax.getOid() );
         }
         else
         {
-            assertNull( syntaxDescription );
+            assertNull( ldapSyntax );
         }
 
         // -------------------------------------------------------------------
@@ -766,11 +777,11 @@
         
         if ( isPresent ) 
         { 
-            assertTrue( service.getRegistries().getSyntaxRegistry().hasSyntax( oid ) );
+            assertTrue( service.getSchemaManager().getLdapSyntaxRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getSyntaxRegistry().hasSyntax( oid ) );
+            assertFalse( service.getSchemaManager().getLdapSyntaxRegistry().contains( oid ) );
         }
     }
     
@@ -814,16 +825,16 @@
 
         descriptions.clear();
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10000 DESC 'bogus desc' FQCN " 
-            + AcceptAllSyntaxChecker.class.getName() + " X-SCHEMA 'nis' )" );
+            + OctetStringSyntaxChecker.class.getName() + " X-SCHEMA 'nis' )" );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10001 DESC 'bogus desc' FQCN " 
-            + AcceptAllSyntaxChecker.class.getName() + " X-SCHEMA 'nis' )" );
+            + OctetStringSyntaxChecker.class.getName() + " X-SCHEMA 'nis' )" );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' FQCN " 
-            + AcceptAllSyntaxChecker.class.getName() + " X-SCHEMA 'nis' )" );
+            + OctetStringSyntaxChecker.class.getName() + " X-SCHEMA 'nis' )" );
 
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", true );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", true );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
 
         // -------------------------------------------------------------------
         // add and check
@@ -883,25 +894,26 @@
         
         Attributes attrs = getSubschemaSubentryAttributes();
         Attribute attrTypes = attrs.get( "matchingRules" );
-        MatchingRuleDescription matchingRuleDescription = null; 
+        MatchingRule matchingRule = null; 
+        
         for ( int ii = 0; ii < attrTypes.size(); ii++ )
         {
             String desc = ( String ) attrTypes.get( ii );
             if ( desc.indexOf( oid ) != -1 )
             {
-                matchingRuleDescription = matchingRuleDescriptionSchemaParser.parseMatchingRuleDescription( desc );
+                matchingRule = matchingRuleDescriptionSchemaParser.parseMatchingRuleDescription( desc );
                 break;
             }
         }
      
         if ( isPresent )
         {
-            assertNotNull( matchingRuleDescription );
-            assertEquals( oid, matchingRuleDescription.getNumericOid() );
+            assertNotNull( matchingRule );
+            assertEquals( oid, matchingRule.getOid() );
         }
         else
         {
-            assertNull( matchingRuleDescription );
+            assertNull( matchingRule );
         }
 
         // -------------------------------------------------------------------
@@ -936,11 +948,11 @@
         
         if ( isPresent ) 
         { 
-            assertTrue( service.getRegistries().getMatchingRuleRegistry().hasMatchingRule( oid ) );
+            assertTrue( service.getSchemaManager().getMatchingRuleRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getMatchingRuleRegistry().hasMatchingRule( oid ) );
+            assertFalse( service.getSchemaManager().getMatchingRuleRegistry().contains( oid ) );
         }
     }
     
@@ -1093,7 +1105,7 @@
         
         Attributes attrs = getSubschemaSubentryAttributes();
         Attribute attrTypes = attrs.get( "attributeTypes" );
-        AttributeTypeDescription attributeTypeDescription = null; 
+        AttributeType attributeType = null; 
         
         for ( int ii = 0; ii < attrTypes.size(); ii++ )
         {
@@ -1101,29 +1113,29 @@
             
             if ( desc.indexOf( oid ) != -1 )
             {
-                attributeTypeDescription = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
+                attributeType = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
                 break;
             }
         }
      
         if ( isPresent )
         {
-            assertNotNull( attributeTypeDescription );
-            assertEquals( oid, attributeTypeDescription.getNumericOid() );
+            assertNotNull( attributeType );
+            assertEquals( oid, attributeType.getOid() );
         }
         else
         {
-            assertNull( attributeTypeDescription );
+            assertNull( attributeType );
         }
 
         // -------------------------------------------------------------------
         // check next to see if it is present in the schema partition
         // -------------------------------------------------------------------
-
         //noinspection UnusedAssignment
         attrs = null;
 
         LdapContext schemaRoot = getSchemaContext( service );
+        
         if ( isPresent )
         {
             attrs = schemaRoot.getAttributes( "m-oid=" + oid + ",ou=attributeTypes,cn=" + schemaName );
@@ -1149,11 +1161,11 @@
         
         if ( isPresent ) 
         { 
-            assertTrue( service.getRegistries().getAttributeTypeRegistry().hasAttributeType( oid ) );
+            assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getAttributeTypeRegistry().hasAttributeType( oid ) );
+            assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( oid ) );
         }
     }
     
@@ -1332,7 +1344,7 @@
                 "SINGLE-VALUE USAGE userApplications X-SCHEMA 'nis' )" );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.2.10001 NAME ( 'type1' 'altName' ) " +
                 "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SUP 2.5.4.41 " +
-                "NO-USER-MODIFICATION USAGE directoryOperation X-SCHEMA 'nis' )" );
+                "USAGE userApplications X-SCHEMA 'nis' )" );
         
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "attributeTypes" );
         
@@ -1371,7 +1383,7 @@
                 "SINGLE-VALUE USAGE userApplications )" );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.2.10001 NAME ( 'type1' 'altName' ) " +
                 "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SUP 2.5.4.41 " +
-                "NO-USER-MODIFICATION USAGE directoryOperation )" );
+                "USAGE userApplications )" );
         
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "attributeTypes" );
         
@@ -1391,7 +1403,7 @@
         disableSchema( "nis" );
         LdapDN dn = new LdapDN( getSubschemaSubentryDN() );
         String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) " +
-            "DESC 'bogus description' SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
+            "DESC 'bogus description' SUP name SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' SINGLE-VALUE X-SCHEMA 'nis' )";
         ModificationItem[] mods = new ModificationItem[1];
         mods[0] = new ModificationItem( DirContext.ADD_ATTRIBUTE, 
             new BasicAttribute( "attributeTypes", substrate ) );
@@ -1400,7 +1412,7 @@
         
         Attributes attrs = getSubschemaSubentryAttributes();
         Attribute attrTypes = attrs.get( "attributeTypes" );
-        AttributeTypeDescription attributeTypeDescription = null;
+        AttributeType attributeType = null;
         
         for ( int ii = 0; ii < attrTypes.size(); ii++ )
         {
@@ -1408,29 +1420,29 @@
             
             if ( desc.indexOf( "1.3.6.1.4.1.18060.0.4.0.2.10000" ) != -1 )
             {
-                attributeTypeDescription = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
+                attributeType = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
                 break;
             }
         }
         
-        assertNull( attributeTypeDescription );
+        assertNull( attributeType );
 
         attrs = getSchemaContext( service ).getAttributes( "m-oid=1.3.6.1.4.1.18060.0.4.0.2.10000,ou=attributeTypes,cn=nis" );
         assertNotNull( attrs );
-        SchemaEntityFactory factory = new SchemaEntityFactory( service.getRegistries() );
+        SchemaEntityFactory factory = new SchemaEntityFactory();
         
-        ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getRegistries() );
+        ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getSchemaManager() );
         
-        AttributeType at = factory.getAttributeType( serverEntry, service.getRegistries(), "nis" );
+        AttributeType at = factory.getAttributeType( service.getSchemaManager(), serverEntry, service.getSchemaManager().getRegistries(), "nis" );
         assertEquals( "1.3.6.1.4.1.18060.0.4.0.2.10000", at.getOid() );
-        assertEquals( "name", at.getSuperior().getName() );
+        assertEquals( "name", at.getSuperiorOid() );
         assertEquals( "bogus description", at.getDescription() );
         assertEquals( "bogus", at.getName() );
-        assertEquals( "bogusName", at.getNamesRef()[1] );
-        assertEquals( true, at.isCanUserModify() );
+        assertEquals( "bogusName", at.getNames().get( 1 ) );
+        assertEquals( true, at.isUserModifiable() );
         assertEquals( false, at.isCollective() );
         assertEquals( false, at.isObsolete() );
-        assertEquals( true, at.isSingleValue() );
+        assertEquals( true, at.isSingleValued() );
     }
 
     
@@ -1445,7 +1457,7 @@
         enableSchema( "nis" );
         LdapDN dn = new LdapDN( getSubschemaSubentryDN() );
         String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) " +
-            "DESC 'bogus description' SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
+            "DESC 'bogus description' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
         ModificationItem[] mods = new ModificationItem[1];
         mods[0] = new ModificationItem( DirContext.ADD_ATTRIBUTE, 
             new BasicAttribute( "attributeTypes", substrate ) );
@@ -1454,45 +1466,46 @@
         
         Attributes attrs = getSubschemaSubentryAttributes();
         Attribute attrTypes = attrs.get( "attributeTypes" );
-        AttributeTypeDescription attributeTypeDescription = null; 
+        AttributeType attributeType = null; 
         
         for ( int ii = 0; ii < attrTypes.size(); ii++ )
         {
             String desc = ( String ) attrTypes.get( ii );
+            
             if ( desc.indexOf( "1.3.6.1.4.1.18060.0.4.0.2.10000" ) != -1 )
             {
-                attributeTypeDescription = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
+                attributeType = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
                 break;
             }
         }
         
-        assertNotNull( attributeTypeDescription );
-        assertEquals( true, attributeTypeDescription.isSingleValued() );
-        assertEquals( false, attributeTypeDescription.isCollective() );
-        assertEquals( false, attributeTypeDescription.isObsolete() );
-        assertEquals( true, attributeTypeDescription.isUserModifiable() );
-        assertEquals( "bogus description", attributeTypeDescription.getDescription() );
-        assertEquals( "bogus", attributeTypeDescription.getNames().get( 0 ) );
-        assertEquals( "bogusName", attributeTypeDescription.getNames().get( 1 ) );
-        assertEquals( "name", attributeTypeDescription.getSuperType() );
+        assertNotNull( attributeType );
+        assertEquals( true, attributeType.isSingleValued() );
+        assertEquals( false, attributeType.isCollective() );
+        assertEquals( false, attributeType.isObsolete() );
+        assertEquals( true, attributeType.isUserModifiable() );
+        assertEquals( "bogus description", attributeType.getDescription() );
+        assertEquals( "bogus", attributeType.getNames().get( 0 ) );
+        assertEquals( "bogusName", attributeType.getNames().get( 1 ) );
+        assertEquals( "name", attributeType.getSuperiorOid() );
         
         attrs = getSchemaContext( service ).getAttributes(
                 "m-oid=1.3.6.1.4.1.18060.0.4.0.2.10000,ou=attributeTypes,cn=nis" );
         assertNotNull( attrs );
-        SchemaEntityFactory factory = new SchemaEntityFactory( service.getRegistries() );
+        SchemaEntityFactory factory = new SchemaEntityFactory();
         
-        ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getRegistries() );
+        ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getSchemaManager() );
 
-        AttributeType at = factory.getAttributeType( serverEntry, service.getRegistries(), "nis" );
+        AttributeType at = factory.getAttributeType( service.getSchemaManager(), serverEntry, service.getSchemaManager().getRegistries(), "nis" );
         assertEquals( "1.3.6.1.4.1.18060.0.4.0.2.10000", at.getOid() );
-        assertEquals( "name", at.getSuperior().getName() );
+        assertEquals( "name", at.getSuperiorOid() );
         assertEquals( "bogus description", at.getDescription() );
-        assertEquals( "bogus", at.getNamesRef()[0] );
-        assertEquals( "bogusName", at.getNamesRef()[1] );
-        assertEquals( true, at.isCanUserModify() );
+        assertEquals( "bogus", at.getNames().get( 0 ) );
+        assertEquals( "bogusName", at.getNames().get( 1 ) );
+        assertEquals( true, at.isUserModifiable() );
         assertEquals( false, at.isCollective() );
         assertEquals( false, at.isObsolete() );
-        assertEquals( true, at.isSingleValue() );
+        assertEquals( true, at.isSingleValued() );
     }
 
 
@@ -1509,25 +1522,26 @@
         
         Attributes attrs = getSubschemaSubentryAttributes();
         Attribute attrTypes = attrs.get( "objectClasses" );
-        ObjectClassDescription objectClassDescription = null; 
-        for ( int ii = 0; ii < attrTypes.size(); ii++ )
+        ObjectClass objectClass = null; 
+        for ( int i = 0; i < attrTypes.size(); i++ )
         {
-            String desc = ( String ) attrTypes.get( ii );
+            String desc = ( String ) attrTypes.get( i );
+            
             if ( desc.indexOf( oid ) != -1 )
             {
-                objectClassDescription = objectClassDescriptionSchemaParser.parseObjectClassDescription( desc );
+                objectClass = objectClassDescriptionSchemaParser.parseObjectClassDescription( desc );
                 break;
             }
         }
      
         if ( isPresent )
         {
-            assertNotNull( objectClassDescription );
-            assertEquals( oid, objectClassDescription.getNumericOid() );
+            assertNotNull( objectClass );
+            assertEquals( oid, objectClass.getOid() );
         }
         else
         {
-            assertNull( objectClassDescription );
+            assertNull( objectClass );
         }
 
         // -------------------------------------------------------------------
@@ -1564,11 +1578,11 @@
         
         if ( isPresent ) 
         { 
-            assertTrue( service.getRegistries().getObjectClassRegistry().hasObjectClass( oid ) );
+            assertTrue( service.getSchemaManager().getObjectClassRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getObjectClassRegistry().hasObjectClass( oid ) );
+            assertFalse( service.getSchemaManager().getObjectClassRegistry().contains( oid ) );
         }
     }
     
@@ -1668,7 +1682,7 @@
         
         descriptions.clear();
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.3.10000 " +
-                "NAME ( 'blah0' 'altname0' ) DESC 'bogus' SUP ( 2.5.6.0 $ dynamicObject ) X-SCHEMA 'nis' )" );
+                "NAME ( 'blah0' 'altname0' ) DESC 'bogus' SUP ( 2.5.6.0 $ dynamicObject ) AUXILIARY X-SCHEMA 'nis' )" );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.3.10001 " +
                 "NAME ( 'blah1' 'altname1' ) DESC 'bogus' SUP ( 2.5.6.0 $ domain ) X-SCHEMA 'nis' )" );
         
@@ -1737,7 +1751,7 @@
 
         descriptions.clear();
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.3.10000 " +
-                "NAME ( 'blah0' 'altname0' ) DESC 'bogus' SUP ( 2.5.6.0 $ dynamicObject ) " +
+                "NAME ( 'blah0' 'altname0' ) DESC 'bogus' SUP ( 2.5.6.0 $ dynamicObject ) AUXILIARY " +
                 "MAY ( sn $ cn ) X-SCHEMA 'nis' )" );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.3.10001 " +
                 "NAME ( 'blah1' 'altname1' ) DESC 'bogus' SUP ( 2.5.6.0 $ domain ) " +
@@ -1758,7 +1772,7 @@
         
         descriptions.clear();
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.3.10000 " +
-                "NAME ( 'blah0' 'altname0' ) DESC 'bogus' SUP ( 2.5.6.0 $ dynamicObject ) " +
+                "NAME ( 'blah0' 'altname0' ) DESC 'bogus' SUP ( 2.5.6.0 $ dynamicObject ) AUXILIARY " +
                 "MUST ( sn $ cn ) X-SCHEMA 'nis' )" );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.3.10001 " +
                 "NAME ( 'blah1' 'altname1' ) DESC 'bogus' SUP ( 2.5.6.0 $ domain ) " +
@@ -1779,14 +1793,14 @@
         
         descriptions.clear();
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.3.10000 " +
-                "NAME ( 'blah0' 'altname0' ) DESC 'bogus' OBSOLETE SUP ( 2.5.6.0 $ dynamicObject ) STRUCTURAL " +
+                "NAME ( 'blah0' 'altname0' ) DESC 'bogus' OBSOLETE SUP ( 2.5.6.0 $ dynamicObject ) AUXILIARY " +
                 "MUST ( sn $ cn ) " +
-                "MAY ( sn $ ou ) " +
+                "MAY ( gn $ ou ) " +
                 "X-SCHEMA 'nis' ) " );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.3.10001 " +
                 "NAME ( 'blah1' 'altname1' ) DESC 'bogus' OBSOLETE SUP ( 2.5.6.0 $ domain ) STRUCTURAL " +
                 "MUST ( sn $ ou ) " +
-                "MAY ( sn $ ou ) " +
+                "MAY ( cn $ gn ) " +
                 "X-SCHEMA 'nis' )" );
         
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "objectClasses" );
@@ -1818,13 +1832,13 @@
         
         descriptions.clear();
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.3.10000 " +
-            "NAME ( 'blah0' 'altname0' ) DESC 'bogus' OBSOLETE SUP ( 2.5.6.0 $ dynamicObject ) STRUCTURAL " +
+            "NAME ( 'blah0' 'altname0' ) DESC 'bogus' OBSOLETE SUP ( 2.5.6.0 $ dynamicObject ) AUXILIARY " +
             "MUST ( sn $ cn ) " +
-            "MAY ( sn $ ou ) )" );
+            "MAY ( gn $ ou ) )" );
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.3.10001 " +
             "NAME ( 'blah1' 'altname1' ) DESC 'bogus' OBSOLETE SUP ( 2.5.6.0 $ domain ) STRUCTURAL " +
             "MUST ( sn $ ou ) " +
-            "MAY ( sn $ ou ) )" );
+            "MAY ( gn $ cn ) )" );
 
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "objectClasses" );
         checkObjectClassPresent( "1.3.6.1.4.1.18060.0.4.1.3.10000", "other", true );
@@ -1865,7 +1879,7 @@
         Attribute modifyTimestampAttr = subentry.get( "modifyTimestamp" );
         assertNotNull( modifiersNameAttr );
         LdapDN expectedDN = new LdapDN( "uid=admin,ou=system" );
-        expectedDN.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        expectedDN.normalize( service.getSchemaManager().getNormalizerMapping() );
         assertEquals( expectedDN.getNormName(), modifiersNameAttr.get() );
         assertNotNull( modifyTimestampAttr );
 
@@ -1903,7 +1917,7 @@
         Attribute modifiersTimestampAttrAfter = subentry.get( "modifyTimestamp" );
         assertNotNull( modifiersNameAttrAfter );
         expectedDN = new LdapDN( "uid=admin,ou=system" );
-        expectedDN.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        expectedDN.normalize( service.getSchemaManager().getNormalizerMapping() );
         assertEquals( expectedDN.getNormName(), modifiersNameAttrAfter.get() );
         assertNotNull( modifiersTimestampAttrAfter );
         
@@ -1956,7 +1970,7 @@
         modifiersTimestampAttrAfter = subentry.get( "modifyTimestamp" );
         assertNotNull( modifiersNameAttrAfter );
         expectedDN = new LdapDN( "cn=bogus user,ou=system" );
-        expectedDN.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        expectedDN.normalize( service.getSchemaManager().getNormalizerMapping() );
         assertEquals( expectedDN.getNormName(), modifiersNameAttrAfter.get() );
         assertNotNull( modifiersTimestampAttrAfter );
         

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java Wed Jan  6 18:26:43 2010
@@ -21,18 +21,9 @@
 package org.apache.directory.server.core.sp;
 
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-
 import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
-import org.apache.directory.server.core.jndi.ServerLdapContext;
-import org.apache.directory.shared.ldap.util.Base64;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import org.junit.Test;
-import org.junit.runner.RunWith;
 
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
@@ -40,6 +31,15 @@
 import javax.naming.directory.BasicAttributes;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.shared.ldap.util.Base64;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 
 /**
  * Test case for LdapClassLoader.
@@ -47,9 +47,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$ $Date$
  */
-@RunWith ( CiRunner.class )
-@CleanupLevel(Level.CLASS)
-public class LdapClassLoaderIT
+@RunWith ( FrameworkRunner.class )
+@CreateDS( factory=DefaultDirectoryServiceFactory.class, name="LdapClassLoaderIT-class" )
+public class LdapClassLoaderIT extends AbstractLdapTestUnit
 {
     private static final String HELLOWORLD_CLASS_BASE64 = "yv66vgAAADEAHQoABgAPCQAQABEIABIKABMAFAcAFQcAFgEABjxpbml0PgEAAygpV"
         + "gEABENvZGUBAA9MaW5lTnVtYmVyVGFibGUBAARtYWluAQAWKFtMamF2YS9sYW5nL1N0cmluZzsp"
@@ -63,9 +63,6 @@
     private static final byte[] HELLOWORLD_CLASS_BYTES = Base64.decode( HELLOWORLD_CLASS_BASE64.toCharArray() );
 
 
-    public static DirectoryService service;
-
-
     @Test
     public void testLdapClassLoaderWithClassLoadedAnywhere() throws Exception
     {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceIT.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceIT.java Wed Jan  6 18:26:43 2010
@@ -21,15 +21,13 @@
 package org.apache.directory.server.core.subtree;
 
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attribute;
@@ -41,8 +39,13 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
-import java.util.HashMap;
-import java.util.Map;
+
+import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -51,11 +54,10 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-public class BadSubentryServiceIT
+@RunWith ( FrameworkRunner.class )
+@CreateDS( name="BadSubentryServiceIT-class" )
+public class BadSubentryServiceIT extends AbstractLdapTestUnit
 {
-    public static DirectoryService service;
-
 
     public Attributes getTestEntry( String cn )
     {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceEntryModificationHandlingIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceEntryModificationHandlingIT.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceEntryModificationHandlingIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceEntryModificationHandlingIT.java Wed Jan  6 18:26:43 2010
@@ -21,14 +21,12 @@
 package org.apache.directory.server.core.subtree;
 
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attribute;
@@ -40,8 +38,14 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
-import java.util.HashMap;
-import java.util.Map;
+
+import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -53,11 +57,10 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-public class SubentryServiceEntryModificationHandlingIT
+@RunWith ( FrameworkRunner.class )
+@CreateDS( factory=DefaultDirectoryServiceFactory.class, name="SubentryServiceEntryModificationHandlingIT-class" )
+public class SubentryServiceEntryModificationHandlingIT extends AbstractLdapTestUnit
 {
-    public static DirectoryService service;
-
 
     public Attributes getTestEntry( String cn )
     {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java Wed Jan  6 18:26:43 2010
@@ -19,22 +19,16 @@
  */
 package org.apache.directory.server.core.subtree;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
-import org.apache.directory.shared.ldap.message.control.SubentriesControl;
-
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attribute;
@@ -47,8 +41,15 @@
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.Control;
 import javax.naming.ldap.LdapContext;
-import java.util.HashMap;
-import java.util.Map;
+
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
+import org.apache.directory.shared.ldap.message.control.SubentriesControl;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -57,12 +58,10 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @Ignore
-public class SubentryServiceIT
+public class SubentryServiceIT extends AbstractLdapTestUnit
 {
-    public static DirectoryService service;
-
 
     public Attributes getTestEntry( String cn )
     {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingIT.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingIT.java Wed Jan  6 18:26:43 2010
@@ -21,17 +21,14 @@
 package org.apache.directory.server.core.subtree;
 
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.BasicAttribute;
@@ -41,8 +38,14 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
-import java.util.HashMap;
-import java.util.Map;
+
+import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -52,11 +55,10 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-public class SubentryServiceObjectClassChangeHandlingIT 
+@RunWith ( FrameworkRunner.class )
+@CreateDS( factory=DefaultDirectoryServiceFactory.class, name="SubentryServiceObjectClassChangeHandlingIT-class" )
+public class SubentryServiceObjectClassChangeHandlingIT extends AbstractLdapTestUnit 
 {
-    public static DirectoryService service;
-
 
     public Attributes getTestEntry( String cn )
     {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/AuthzISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/AuthzISuite.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/AuthzISuite.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/AuthzISuite.java Wed Jan  6 18:26:43 2010
@@ -19,6 +19,7 @@
 package org.apache.directory.server.core.suites;
 
 
+import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.authz.AddAuthorizationIT;
 import org.apache.directory.server.core.authz.AdministratorsGroupIT;
 import org.apache.directory.server.core.authz.AuthorizationServiceAsAdminIT;
@@ -30,9 +31,7 @@
 import org.apache.directory.server.core.authz.ModifyAuthorizationIT;
 import org.apache.directory.server.core.authz.MoveRenameAuthorizationIT;
 import org.apache.directory.server.core.authz.SearchAuthorizationIT;
-import org.apache.directory.server.core.integ.CiSuite;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.*;
+import org.apache.directory.server.core.integ.FrameworkSuite;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 
@@ -43,7 +42,8 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith ( CiSuite.class )
+@RunWith ( FrameworkSuite.class )
+@CreateDS( enableAccessControl=true, name="AuthzISuite" )
 @Suite.SuiteClasses ( {
         AddAuthorizationIT.class,
         AuthorizationServiceAsAdminIT.class,
@@ -59,7 +59,6 @@
                                         // the default factory service running instead of
                                         // one with 
         } )
-@CleanupLevel ( Level.SUITE )
 public class AuthzISuite
 {
 }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/SchemaISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/SchemaISuite.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/SchemaISuite.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/SchemaISuite.java Wed Jan  6 18:26:43 2010
@@ -19,9 +19,8 @@
 package org.apache.directory.server.core.suites;
 
 
-import org.apache.directory.server.core.integ.CiSuite;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.*;
+import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.integ.FrameworkSuite;
 import org.apache.directory.server.core.schema.MetaAttributeTypeHandlerIT;
 import org.apache.directory.server.core.schema.MetaComparatorHandlerIT;
 import org.apache.directory.server.core.schema.MetaMatchingRuleHandlerIT;
@@ -33,7 +32,6 @@
 import org.apache.directory.server.core.schema.ObjectClassCreateIT;
 import org.apache.directory.server.core.schema.SchemaPersistenceIT;
 import org.apache.directory.server.core.schema.SchemaServiceIT;
-import org.apache.directory.server.core.schema.SubschemaSubentryIT;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 
@@ -44,7 +42,8 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith ( CiSuite.class )
+@RunWith ( FrameworkSuite.class )
+@CreateDS( name="SchemaISuite" )
 @Suite.SuiteClasses ( {
         MetaAttributeTypeHandlerIT.class,
         MetaComparatorHandlerIT.class,
@@ -56,10 +55,9 @@
         MetaSyntaxHandlerIT.class,
         ObjectClassCreateIT.class,
         SchemaPersistenceIT.class,
-        SubschemaSubentryIT.class,
+        //SubschemaSubentryIT.class,
         SchemaServiceIT.class
         } )
-@CleanupLevel ( Level.SUITE )
 public class SchemaISuite
 {
 }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java Wed Jan  6 18:26:43 2010
@@ -21,18 +21,14 @@
 package org.apache.directory.server.core.trigger;
 
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.fail;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attribute;
@@ -44,8 +40,14 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
-import java.util.HashMap;
-import java.util.Map;
+
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -54,13 +56,11 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev:$
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @Ignore ( "Reverts are failing to delete marked entries. Fixing this " +
         "problem in testEntryAdd() will fix it all over." )
-public class SubentryServiceForTriggersIT
+public class SubentryServiceForTriggersIT extends AbstractLdapTestUnit
 {
-    public static DirectoryService service;
-
 
     public Attributes getTestEntry( String cn )
     {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/TriggerInterceptorIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/TriggerInterceptorIT.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/TriggerInterceptorIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/TriggerInterceptorIT.java Wed Jan  6 18:26:43 2010
@@ -21,25 +21,25 @@
 package org.apache.directory.server.core.trigger;
 
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import static org.apache.directory.server.core.integ.IntegrationUtils.injectEntries;
-import org.apache.directory.shared.ldap.sp.JavaStoredProcUtils;
-import org.apache.directory.shared.ldap.trigger.TriggerUtils;
-import org.apache.directory.shared.ldap.util.AttributeUtils;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.BasicAttributes;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.shared.ldap.sp.JavaStoredProcUtils;
+import org.apache.directory.shared.ldap.trigger.TriggerUtils;
+import org.apache.directory.shared.ldap.util.AttributeUtils;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 
 /**
  * Integration tests for TriggerInterceptor.
@@ -47,12 +47,10 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev:$
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @Ignore
-public class TriggerInterceptorIT
+public class TriggerInterceptorIT extends AbstractLdapTestUnit
 {
-    public static DirectoryService service;
-
     LdapContext spCtx;
 
 

Modified: directory/apacheds/trunk/core-integ/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/resources/log4j.properties?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/resources/log4j.properties (original)
+++ directory/apacheds/trunk/core-integ/src/test/resources/log4j.properties Wed Jan  6 18:26:43 2010
@@ -19,6 +19,4 @@
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
-log4j.logger.org.apache.directory.server.core.integ=ERROR
 
-#log4j.logger.org.apache.directory.server.core.partition.PartitionIT=DEBUG

Modified: directory/apacheds/trunk/core-integ/src/test/resources/org/apache/directory/server/core/schema/DummyComparator.bytecode
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/resources/org/apache/directory/server/core/schema/DummyComparator.bytecode?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
Binary files - no diff available.

Modified: directory/apacheds/trunk/core-integ/src/test/resources/org/apache/directory/server/core/schema/DummyNormalizer.bytecode
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/resources/org/apache/directory/server/core/schema/DummyNormalizer.bytecode?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
Binary files - no diff available.

Modified: directory/apacheds/trunk/core-integ/src/test/resources/org/apache/directory/server/core/schema/DummySyntaxChecker.bytecode
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/resources/org/apache/directory/server/core/schema/DummySyntaxChecker.bytecode?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
Binary files - no diff available.

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java Wed Jan  6 18:26:43 2010
@@ -117,7 +117,7 @@
     {
         try
         {
-            Binding binding = new Binding( opContext.getDn().getUpName(), 
+            Binding binding = new Binding( opContext.getDn().getName(), 
                 ServerEntryUtils.toBasicAttributes( opContext.getEntry() ), false );
             NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_ADDED, 
                 binding, null, opContext );
@@ -143,7 +143,7 @@
         {
             if ( listener instanceof NamespaceChangeListener )
             {
-                Binding binding = new Binding( opContext.getDn().getUpName(), 
+                Binding binding = new Binding( opContext.getDn().getName(), 
                     ServerEntryUtils.toBasicAttributes( opContext.getEntry() ), false );
                 NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_REMOVED, null, 
                     binding, opContext );
@@ -164,9 +164,9 @@
     {
         try
         {
-            Binding newBinding = new Binding( opContext.getDn().getUpName(), 
+            Binding newBinding = new Binding( opContext.getDn().getName(), 
                 ServerEntryUtils.toBasicAttributes( opContext.getEntry() ), false );
-            Binding oldBinding = new Binding( opContext.getDn().getUpName(), 
+            Binding oldBinding = new Binding( opContext.getDn().getName(), 
                 ServerEntryUtils.toBasicAttributes( opContext.getEntry().getOriginalEntry() ),  false );
             NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_CHANGED, 
                 newBinding, oldBinding, opContext );
@@ -192,9 +192,9 @@
         {
             if ( listener instanceof NamespaceChangeListener )
             {
-                Binding newBinding = new Binding( opContext.getDn().getUpName(), 
+                Binding newBinding = new Binding( opContext.getDn().getName(), 
                     ServerEntryUtils.toBasicAttributes( opContext.getEntry() ), false );
-                Binding oldBinding = new Binding( opContext.getDn().getUpName(), 
+                Binding oldBinding = new Binding( opContext.getDn().getName(), 
                     ServerEntryUtils.toBasicAttributes( opContext.getEntry().getOriginalEntry() ), false );
                 NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_RENAMED, 
                     newBinding, oldBinding, opContext );
@@ -217,9 +217,9 @@
         {
             if ( listener instanceof NamespaceChangeListener )
             {
-                Binding newBinding = new Binding( opContext.getDn().getUpName(), 
+                Binding newBinding = new Binding( opContext.getDn().getName(), 
                     ServerEntryUtils.toBasicAttributes( opContext.getEntry() ), false );
-                Binding oldBinding = new Binding( opContext.getDn().getUpName(), 
+                Binding oldBinding = new Binding( opContext.getDn().getName(), 
                     ServerEntryUtils.toBasicAttributes( opContext.getEntry().getOriginalEntry() ), false );
                 NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_RENAMED, 
                     newBinding, oldBinding, opContext );
@@ -242,9 +242,9 @@
         {
             if ( listener instanceof NamespaceChangeListener )
             {
-                Binding newBinding = new Binding( opContext.getDn().getUpName(), 
+                Binding newBinding = new Binding( opContext.getDn().getName(), 
                     ServerEntryUtils.toBasicAttributes( opContext.getEntry() ), false );
-                Binding oldBinding = new Binding( opContext.getDn().getUpName(), 
+                Binding oldBinding = new Binding( opContext.getDn().getName(), 
                     ServerEntryUtils.toBasicAttributes( opContext.getEntry().getOriginalEntry() ), false );
                 NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_RENAMED, 
                     newBinding, oldBinding, null );

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java Wed Jan  6 18:26:43 2010
@@ -20,13 +20,6 @@
 package org.apache.directory.server.core.jndi;
 
 
-import org.apache.directory.server.core.entry.DefaultServerAttribute;
-import org.apache.directory.server.core.entry.ServerAttribute;
-import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.schema.registries.Registries;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.schema.AttributeType;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -35,6 +28,13 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.server.core.entry.DefaultServerAttribute;
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
+
 
 /**
  * Contains constants and serialization methods used to implement functionality
@@ -164,7 +164,7 @@
      * @param obj the object to serialize
      * @throws NamingException if the object cannot be serialized
      */
-    static void serialize( ServerEntry entry, Object obj, Registries registries ) throws NamingException
+    static void serialize( ServerEntry entry, Object obj, SchemaManager schemaManager ) throws NamingException
     {
         /* Let's add the object classes first:
          * objectClass: top
@@ -184,7 +184,7 @@
 
         // Add all the class names this object can be cast to:
         Class<?>[] classes = obj.getClass().getClasses();
-        AttributeType attributeType = registries.getAttributeTypeRegistry().lookup( JCLASSNAMES_ATTR );
+        AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( JCLASSNAMES_ATTR );
         ServerAttribute javaClassNames = new DefaultServerAttribute( attributeType, JCLASSNAMES_ATTR );
 
         for ( int ii = 0; ii < classes.length; ii++ )

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/NamingEnumerationAdapter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/NamingEnumerationAdapter.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/NamingEnumerationAdapter.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/NamingEnumerationAdapter.java Wed Jan  6 18:26:43 2010
@@ -116,7 +116,7 @@
             JndiUtils.wrap( e );
         }
         
-        SearchResult result = new SearchResult( entry.getDn().getUpName(), null, 
+        SearchResult result = new SearchResult( entry.getDn().getName(), null, 
             ServerEntryUtils.toBasicAttributes( entry ) );
         result.setRelative( false );
         return result;