You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2013/08/20 11:52:19 UTC

svn commit: r1515753 - in /directory/apacheds/trunk: core-annotations/src/main/java/org/apache/directory/server/core/factory/ mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/ mavibot-partition/src/test/java...

Author: kayyagari
Date: Tue Aug 20 09:52:18 2013
New Revision: 1515753

URL: http://svn.apache.org/r1515753
Log:
removed RecordManager from constructor paramters

Modified:
    directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/MavibotPartitionFactory.java
    directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotDnIndex.java
    directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndex.java
    directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotPartition.java
    directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndex.java
    directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndexTest.java
    directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndexTest.java
    directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotStoreTest.java

Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/MavibotPartitionFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/MavibotPartitionFactory.java?rev=1515753&r1=1515752&r2=1515753&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/MavibotPartitionFactory.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/MavibotPartitionFactory.java Tue Aug 20 09:52:18 2013
@@ -72,7 +72,7 @@ public class MavibotPartitionFactory imp
 
         RecordManager recordMan = ( ( MavibotPartition ) partition ).getRecordMan();
         
-        MavibotIndex<Object, Entry> index = new MavibotIndex<Object, Entry>( recordMan, attributeId, false );
+        MavibotIndex<Object, Entry> index = new MavibotIndex<Object, Entry>( attributeId, false );
         index.setCacheSize( cacheSize );
 
         indexedAttributes.add( index );

Modified: directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotDnIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotDnIndex.java?rev=1515753&r1=1515752&r2=1515753&view=diff
==============================================================================
--- directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotDnIndex.java (original)
+++ directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotDnIndex.java Tue Aug 20 09:52:18 2013
@@ -49,9 +49,9 @@ public class MavibotDnIndex extends Mavi
     private static final Logger LOG = LoggerFactory.getLogger( MavibotDnIndex.class );
 
 
-    public MavibotDnIndex( RecordManager recordMan, String oid )
+    public MavibotDnIndex( String oid )
     {
-        super( recordMan, oid, true );
+        super( oid, true );
         initialized = false;
     }
 

Modified: directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndex.java?rev=1515753&r1=1515752&r2=1515753&view=diff
==============================================================================
--- directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndex.java (original)
+++ directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndex.java Tue Aug 20 09:52:18 2013
@@ -91,12 +91,10 @@ public class MavibotIndex<K, V> extends 
     /**
      * Creates a JdbmIndex instance for a give AttributeId
      */
-    public MavibotIndex( RecordManager recordMan, String attributeId, boolean withReverse )
+    public MavibotIndex( String attributeId, boolean withReverse )
     {
         super( attributeId, withReverse );
 
-        this.recordMan = recordMan;
-
         initialized = false;
     }
 
@@ -111,6 +109,12 @@ public class MavibotIndex<K, V> extends 
     public void init( SchemaManager schemaManager, AttributeType attributeType ) throws IOException
     {
         LOG.debug( "Initializing an Index for attribute '{}'", attributeType.getName() );
+        
+        // check if the RecordManager reference is null, if yes, then throw an IllegalStateException
+        if ( recordMan == null )
+        {
+            throw new IllegalStateException( "No RecordManager reference was set in the index " + getAttributeId() );
+        }
 
         this.attributeType = attributeType;
 
@@ -210,7 +214,18 @@ public class MavibotIndex<K, V> extends 
         fw.close();
     }
 
-
+    
+    /**
+     * Sets the RecordManager
+     * 
+     * @param rm the RecordManager instance
+     */
+    public void setRecordManager( RecordManager rm )
+    {
+        this.recordMan = rm;
+    }
+    
+    
     // ------------------------------------------------------------------------
     // C O N F I G U R A T I O N   M E T H O D S
     // ------------------------------------------------------------------------

Modified: directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotPartition.java?rev=1515753&r1=1515752&r2=1515753&view=diff
==============================================================================
--- directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotPartition.java (original)
+++ directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotPartition.java Tue Aug 20 09:52:18 2013
@@ -208,13 +208,12 @@ public class MavibotPartition extends Ab
         {
             LOG.debug( "Supplied index {} is not a MavibotIndex.  "
                 + "Will create new MavibotIndex using copied configuration parameters.", index );
-            mavibotIndex = new MavibotIndex( recordMan, index.getAttributeId(), true );
+            mavibotIndex = new MavibotIndex( index.getAttributeId(), true );
             mavibotIndex.setCacheSize( index.getCacheSize() );
             mavibotIndex.setWkDirPath( index.getWkDirPath() );
         }
 
-        // during restart the indices will contain reference to an old recordmanager
-        mavibotIndex.recordMan = recordMan;
+        mavibotIndex.setRecordManager( recordMan );
         
         mavibotIndex.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( index.getAttributeId() ) );
 
@@ -231,17 +230,17 @@ public class MavibotPartition extends Ab
 
         if ( indexOid.equals( ApacheSchemaConstants.APACHE_RDN_AT_OID ) )
         {
-            mavibotIndex = new MavibotRdnIndex( recordMan );
+            mavibotIndex = new MavibotRdnIndex();
             mavibotIndex.setAttributeId( ApacheSchemaConstants.APACHE_RDN_AT_OID );
         }
         else if ( indexOid.equals( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ) )
         {
-            mavibotIndex = new MavibotDnIndex( recordMan, ApacheSchemaConstants.APACHE_ALIAS_AT_OID );
+            mavibotIndex = new MavibotDnIndex( ApacheSchemaConstants.APACHE_ALIAS_AT_OID );
             mavibotIndex.setAttributeId( ApacheSchemaConstants.APACHE_ALIAS_AT_OID );
         }
         else
         {
-            mavibotIndex = new MavibotIndex( recordMan, indexOid, withReverse );
+            mavibotIndex = new MavibotIndex( indexOid, withReverse );
         }
 
         mavibotIndex.setWkDirPath( path );

Modified: directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndex.java?rev=1515753&r1=1515752&r2=1515753&view=diff
==============================================================================
--- directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndex.java (original)
+++ directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndex.java Tue Aug 20 09:52:18 2013
@@ -51,9 +51,9 @@ public class MavibotRdnIndex extends Mav
     private static final Logger LOG = LoggerFactory.getLogger( MavibotRdnIndex.class );
 
 
-    public MavibotRdnIndex( RecordManager recordMan )
+    public MavibotRdnIndex()
     {
-        super( recordMan, ApacheSchemaConstants.APACHE_RDN_AT_OID, true );
+        super( ApacheSchemaConstants.APACHE_RDN_AT_OID, true );
         initialized = false;
     }
 

Modified: directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndexTest.java?rev=1515753&r1=1515752&r2=1515753&view=diff
==============================================================================
--- directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndexTest.java (original)
+++ directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotIndexTest.java Tue Aug 20 09:52:18 2013
@@ -133,7 +133,7 @@ public class MavibotIndexTest
     void initIndex() throws Exception
     {
         AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OU_AT );
-        MavibotIndex<String, Entry> index = new MavibotIndex<String, Entry>( recordMan, attributeType.getName(), false );
+        MavibotIndex<String, Entry> index = new MavibotIndex<String, Entry>( attributeType.getName(), false );
         index.setWkDirPath( dbFileDir.toURI() );
         initIndex( index );
     }
@@ -145,9 +145,10 @@ public class MavibotIndexTest
 
         if ( mavibotIdx == null )
         {
-            mavibotIdx = new MavibotIndex<String, Entry>( recordMan, attributeType.getName(), false );
+            mavibotIdx = new MavibotIndex<String, Entry>( attributeType.getName(), false );
         }
-
+        
+        mavibotIdx.setRecordManager( recordMan );
         mavibotIdx.init( schemaManager, attributeType );
         this.idx = mavibotIdx;
     }
@@ -161,10 +162,10 @@ public class MavibotIndexTest
     public void testAttributeId() throws Exception
     {
         // uninitialized index
-        MavibotIndex<Object, Object> MavibotIndex1 = new MavibotIndex<Object, Object>( recordMan, "foo", false );
+        MavibotIndex<Object, Object> MavibotIndex1 = new MavibotIndex<Object, Object>( "foo", false );
         assertEquals( "foo", MavibotIndex1.getAttributeId() );
 
-        MavibotIndex<Object, Object> MavibotIndex2 = new MavibotIndex<Object, Object>( recordMan, "bar", false );
+        MavibotIndex<Object, Object> MavibotIndex2 = new MavibotIndex<Object, Object>( "bar", false );
         assertEquals( "bar", MavibotIndex2.getAttributeId() );
 
         // initialized index
@@ -182,7 +183,7 @@ public class MavibotIndexTest
         assertEquals( "ou", idx.getAttributeId() );
 
         destroyIndex();
-        MavibotIndex<String, Entry> index = new MavibotIndex<String, Entry>( recordMan, "foo", false );
+        MavibotIndex<String, Entry> index = new MavibotIndex<String, Entry>( "foo", false );
         index.setWkDirPath( dbFileDir.toURI() );
         initIndex( index );
         assertEquals( "foo", idx.getAttributeId() );
@@ -193,7 +194,7 @@ public class MavibotIndexTest
     public void testCacheSize() throws Exception
     {
         // uninitialized index
-        MavibotIndex<Object, Object> MavibotIndex = new MavibotIndex<Object, Object>( recordMan, "ou", false );
+        MavibotIndex<Object, Object> MavibotIndex = new MavibotIndex<Object, Object>( "ou", false );
         MavibotIndex.setCacheSize( 337 );
         assertEquals( 337, MavibotIndex.getCacheSize() );
 
@@ -218,7 +219,7 @@ public class MavibotIndexTest
         File wkdir = new File( dbFileDir, "foo" );
 
         // uninitialized index
-        MavibotIndex<String, Entry> MavibotIndex = new MavibotIndex<String, Entry>( recordMan, "foo", false );
+        MavibotIndex<String, Entry> MavibotIndex = new MavibotIndex<String, Entry>( "foo", false );
         MavibotIndex.setWkDirPath( wkdir.toURI() );
         assertEquals( "foo", new File( MavibotIndex.getWkDirPath() ).getName() );
 
@@ -237,7 +238,7 @@ public class MavibotIndexTest
         assertEquals( dbFileDir.toURI(), idx.getWkDirPath() );
 
         destroyIndex();
-        MavibotIndex = new MavibotIndex<String, Entry>( recordMan, "ou", false );
+        MavibotIndex = new MavibotIndex<String, Entry>( "ou", false );
         wkdir.mkdirs();
         MavibotIndex.setWkDirPath( wkdir.toURI() );
         initIndex( MavibotIndex );
@@ -249,7 +250,7 @@ public class MavibotIndexTest
     public void testGetAttribute() throws Exception
     {
         // uninitialized index
-        MavibotIndex<Object, Object> MavibotIndex = new MavibotIndex<Object, Object>( recordMan, "ou", false );
+        MavibotIndex<Object, Object> MavibotIndex = new MavibotIndex<Object, Object>( "ou", false );
         assertNull( MavibotIndex.getAttribute() );
 
         initIndex();
@@ -504,12 +505,13 @@ public class MavibotIndexTest
     @Test
     public void testNoEqualityMatching() throws Exception
     {
-        MavibotIndex<Object, Object> MavibotIndex = new MavibotIndex<Object, Object>( recordMan, "1.1", false );
+        MavibotIndex<Object, Object> MavibotIndex = new MavibotIndex<Object, Object>( "1.1", false );
 
         try
         {
             AttributeType noEqMatchAttribute = new AttributeType( "1.1" );
             MavibotIndex.setWkDirPath( dbFileDir.toURI() );
+            MavibotIndex.setRecordManager( recordMan );
             MavibotIndex.init( schemaManager, noEqMatchAttribute );
             fail( "should not get here" );
         }
@@ -526,8 +528,9 @@ public class MavibotIndexTest
     @Test
     public void testSingleValuedAttribute() throws Exception
     {
-        MavibotIndex<Object, Object> MavibotIndex = new MavibotIndex<Object, Object>( recordMan, SchemaConstants.CREATORS_NAME_AT, false );
+        MavibotIndex<Object, Object> MavibotIndex = new MavibotIndex<Object, Object>( SchemaConstants.CREATORS_NAME_AT, false );
         MavibotIndex.setWkDirPath( dbFileDir.toURI() );
+        MavibotIndex.setRecordManager( recordMan );
         MavibotIndex.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( SchemaConstants.CREATORS_NAME_AT ) );
         MavibotIndex.close();
     }

Modified: directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndexTest.java?rev=1515753&r1=1515752&r2=1515753&view=diff
==============================================================================
--- directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndexTest.java (original)
+++ directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotRdnIndexTest.java Tue Aug 20 09:52:18 2013
@@ -124,22 +124,23 @@ public class MavibotRdnIndexTest
 
     void initIndex() throws Exception
     {
-        MavibotRdnIndex index = new MavibotRdnIndex( recordMan );
+        MavibotRdnIndex index = new MavibotRdnIndex();
         index.setWkDirPath( tmpDir.getRoot().toURI() );
         initIndex( index );
     }
 
 
-    void initIndex( MavibotRdnIndex jdbmIdx ) throws Exception
+    void initIndex( MavibotRdnIndex mavibotIdx ) throws Exception
     {
-        if ( jdbmIdx == null )
+        if ( mavibotIdx == null )
         {
-            jdbmIdx = new MavibotRdnIndex( recordMan );
+            mavibotIdx = new MavibotRdnIndex();
         }
 
-        jdbmIdx.init( schemaManager,
+        mavibotIdx.setRecordManager( recordMan );
+        mavibotIdx.init( schemaManager,
             schemaManager.lookupAttributeTypeRegistry( ApacheSchemaConstants.APACHE_RDN_AT_OID ) );
-        this.idx = jdbmIdx;
+        this.idx = mavibotIdx;
     }
 
 
@@ -151,7 +152,7 @@ public class MavibotRdnIndexTest
     public void testCacheSize() throws Exception
     {
         // uninitialized index
-        MavibotRdnIndex MavibotRdnIndex = new MavibotRdnIndex( recordMan );
+        MavibotRdnIndex MavibotRdnIndex = new MavibotRdnIndex();
         MavibotRdnIndex.setCacheSize( 337 );
         assertEquals( 337, MavibotRdnIndex.getCacheSize() );
 
@@ -177,7 +178,7 @@ public class MavibotRdnIndexTest
     public void testGetAttribute() throws Exception
     {
         // uninitialized index
-        MavibotRdnIndex rdnIndex = new MavibotRdnIndex( recordMan );
+        MavibotRdnIndex rdnIndex = new MavibotRdnIndex();
         assertNull( rdnIndex.getAttribute() );
 
         initIndex();

Modified: directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotStoreTest.java?rev=1515753&r1=1515752&r2=1515753&view=diff
==============================================================================
--- directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotStoreTest.java (original)
+++ directory/apacheds/trunk/mavibot-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotStoreTest.java Tue Aug 20 09:52:18 2013
@@ -161,11 +161,11 @@ public class MavibotStoreTest
         store.setPartitionPath( wkdir.toURI() );
         store.setSyncOnWrite( false );
 
-        MavibotIndex ouIndex = new MavibotIndex( recordMan, SchemaConstants.OU_AT_OID, false );
+        MavibotIndex ouIndex = new MavibotIndex( SchemaConstants.OU_AT_OID, false );
         ouIndex.setWkDirPath( wkdir.toURI() );
         store.addIndex( ouIndex );
 
-        MavibotIndex uidIndex = new MavibotIndex( recordMan, SchemaConstants.UID_AT_OID, false );
+        MavibotIndex uidIndex = new MavibotIndex( SchemaConstants.UID_AT_OID, false );
         uidIndex.setWkDirPath( wkdir.toURI() );
         store.addIndex( uidIndex );
 
@@ -217,8 +217,8 @@ public class MavibotStoreTest
         store2.setCacheSize( 10 );
         store2.setPartitionPath( wkdir2.toURI() );
         store2.setSyncOnWrite( false );
-        store2.addIndex( new MavibotIndex( recordMan, SchemaConstants.OU_AT_OID, false ) );
-        store2.addIndex( new MavibotIndex( recordMan, SchemaConstants.UID_AT_OID, false ) );
+        store2.addIndex( new MavibotIndex( SchemaConstants.OU_AT_OID, false ) );
+        store2.addIndex( new MavibotIndex( SchemaConstants.UID_AT_OID, false ) );
         store2.setSuffixDn( EXAMPLE_COM );
         store2.initialize();
 
@@ -251,7 +251,7 @@ public class MavibotStoreTest
         MavibotPartition.setSyncOnWrite( true ); // for code coverage
 
         assertNull( MavibotPartition.getAliasIndex() );
-        Index<Dn, Entry, String> index = new MavibotIndex<Dn, Entry>( recordMan, ApacheSchemaConstants.APACHE_ALIAS_AT_OID,
+        Index<Dn, Entry, String> index = new MavibotIndex<Dn, Entry>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID,
             true );
         ( ( Store ) MavibotPartition ).addIndex( index );
         assertNotNull( MavibotPartition.getAliasIndex() );
@@ -261,7 +261,7 @@ public class MavibotStoreTest
         assertEquals( 24, MavibotPartition.getCacheSize() );
 
         assertNull( MavibotPartition.getPresenceIndex() );
-        MavibotPartition.addIndex( new MavibotIndex<String, Entry>( recordMan, ApacheSchemaConstants.APACHE_PRESENCE_AT_OID, false ) );
+        MavibotPartition.addIndex( new MavibotIndex<String, Entry>( ApacheSchemaConstants.APACHE_PRESENCE_AT_OID, false ) );
         assertNotNull( MavibotPartition.getPresenceIndex() );
 
         assertNull( MavibotPartition.getId() );
@@ -269,16 +269,15 @@ public class MavibotStoreTest
         assertEquals( "foo", MavibotPartition.getId() );
 
         assertNull( MavibotPartition.getRdnIndex() );
-        MavibotPartition.addIndex( new MavibotRdnIndex( recordMan ) );
+        MavibotPartition.addIndex( new MavibotRdnIndex() );
         assertNotNull( MavibotPartition.getRdnIndex() );
 
         assertNull( MavibotPartition.getOneAliasIndex() );
-        ( ( Store ) MavibotPartition ).addIndex( new MavibotIndex<Long, Entry>( recordMan,
-            ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID, true ) );
+        ( ( Store ) MavibotPartition ).addIndex( new MavibotIndex<Long, Entry>( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID, true ) );
         assertNotNull( MavibotPartition.getOneAliasIndex() );
 
         assertNull( MavibotPartition.getSubAliasIndex() );
-        MavibotPartition.addIndex( new MavibotIndex<Long, Entry>( recordMan, ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID, true ) );
+        MavibotPartition.addIndex( new MavibotIndex<Long, Entry>( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID, true ) );
         assertNotNull( MavibotPartition.getSubAliasIndex() );
 
         assertNull( MavibotPartition.getSuffixDn() );
@@ -288,7 +287,7 @@ public class MavibotStoreTest
         assertNotNull( MavibotPartition.getSuffixDn() );
 
         assertFalse( MavibotPartition.getUserIndices().hasNext() );
-        MavibotPartition.addIndex( new MavibotIndex<Object, Entry>( recordMan, "2.5.4.3", false ) );
+        MavibotPartition.addIndex( new MavibotIndex<Object, Entry>( "2.5.4.3", false ) );
         assertEquals( true, MavibotPartition.getUserIndices().hasNext() );
 
         assertNull( MavibotPartition.getPartitionPath() );
@@ -312,7 +311,7 @@ public class MavibotStoreTest
         assertNotNull( store.getAliasIndex() );
         try
         {
-            store.addIndex( new MavibotIndex<Dn, Entry>( recordMan, ApacheSchemaConstants.APACHE_ALIAS_AT_OID, true ) );
+            store.addIndex( new MavibotIndex<Dn, Entry>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID, true ) );
             fail();
         }
         catch ( IllegalStateException e )
@@ -331,7 +330,7 @@ public class MavibotStoreTest
         assertNotNull( store.getPresenceIndex() );
         try
         {
-            store.addIndex( new MavibotIndex<String, Entry>( recordMan, ApacheSchemaConstants.APACHE_PRESENCE_AT_OID, false ) );
+            store.addIndex( new MavibotIndex<String, Entry>( ApacheSchemaConstants.APACHE_PRESENCE_AT_OID, false ) );
             fail();
         }
         catch ( IllegalStateException e )
@@ -351,7 +350,7 @@ public class MavibotStoreTest
         assertNotNull( store.getRdnIndex() );
         try
         {
-            store.addIndex( new MavibotRdnIndex( recordMan ) );
+            store.addIndex( new MavibotRdnIndex() );
             fail();
         }
         catch ( IllegalStateException e )
@@ -361,7 +360,7 @@ public class MavibotStoreTest
         assertNotNull( store.getOneAliasIndex() );
         try
         {
-            store.addIndex( new MavibotIndex<Long, Entry>( recordMan, ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID, true ) );
+            store.addIndex( new MavibotIndex<Long, Entry>( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID, true ) );
             fail();
         }
         catch ( IllegalStateException e )
@@ -371,7 +370,7 @@ public class MavibotStoreTest
         assertNotNull( store.getSubAliasIndex() );
         try
         {
-            store.addIndex( new MavibotIndex<Long, Entry>( recordMan, ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID, true ) );
+            store.addIndex( new MavibotIndex<Long, Entry>( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID, true ) );
             fail();
         }
         catch ( IllegalStateException e )
@@ -799,7 +798,7 @@ public class MavibotStoreTest
         store.setPartitionPath( wkdir.toURI() );
         store.setSyncOnWrite( false );
         // do not add ou index this time
-        store.addIndex( new MavibotIndex( recordMan, SchemaConstants.UID_AT_OID, false ) );
+        store.addIndex( new MavibotIndex( SchemaConstants.UID_AT_OID, false ) );
 
         Dn suffixDn = new Dn( schemaManager, "o=Good Times Co." );
         store.setSuffixDn( suffixDn );