You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2008/05/10 18:30:51 UTC

svn commit: r655126 [7/9] - in /directory/sandbox/akarasulu/bigbang: apacheds/ apacheds/apacheds-jdbm/ apacheds/apacheds-jdbm/src/ apacheds/apacheds-jdbm/src/etc/ apacheds/apacheds-jdbm/src/examples/ apacheds/apacheds-jdbm/src/main/ apacheds/apacheds-j...

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java Sat May 10 09:30:45 2008
@@ -22,7 +22,6 @@
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
@@ -42,6 +41,7 @@
 import org.apache.directory.shared.ldap.schema.OidNormalizer;
 import org.apache.directory.shared.ldap.trigger.TriggerSpecification;
 import org.apache.directory.shared.ldap.trigger.TriggerSpecificationParser;
+import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -113,7 +113,8 @@
         {
             String suffix = suffixes.next();
             LdapDN baseDn = new LdapDN( suffix );
-            ExprNode filter = new EqualityNode( SchemaConstants.OBJECT_CLASS_AT, ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC );
+            ExprNode filter = new EqualityNode( SchemaConstants.OBJECT_CLASS_AT, 
+                    new ClientStringValue( ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC ) );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             NamingEnumeration<ServerSearchResult> results = 
@@ -121,7 +122,7 @@
             
             while ( results.hasMore() )
             {
-            	ServerSearchResult result = results.next();
+                ServerSearchResult result = results.next();
                 LdapDN subentryDn = result.getDn();
                 ServerEntry resultEntry = result.getServerEntry();
                 EntryAttribute triggerSpec = resultEntry.get( PRESCRIPTIVE_TRIGGER_ATTR );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java Sat May 10 09:30:45 2008
@@ -97,7 +97,7 @@
         Context ctx = new DeadContext();
         DirectoryService ds = new MockDirectoryService();
         PartitionNexusProxy proxy = new PartitionNexusProxy( ctx, ds );
-        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]{ dn } );
+        Invocation i = new Invocation( proxy, ctx, "lookup" );
         InvocationStack.getInstance().push( i );
 
         try
@@ -122,8 +122,7 @@
         Context ctx = new DeadContext();
         DirectoryService ds = new MockDirectoryService();
         PartitionNexusProxy proxy = new PartitionNexusProxy( ctx, ds );
-        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]
-            { dn }, Collections.singleton( "0" ) );
+        Invocation i = new Invocation( proxy, ctx, "lookup", Collections.singleton( "0" ) );
         InvocationStack.getInstance().push( i );
 
         try
@@ -151,8 +150,7 @@
         Set<String> bypass = new HashSet<String>();
         bypass.add( "0" );
         bypass.add( "1" );
-        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]
-            { dn }, bypass );
+        Invocation i = new Invocation( proxy, ctx, "lookup", bypass );
         InvocationStack.getInstance().push( i );
 
         try
@@ -180,8 +178,7 @@
         Set<String> bypass = new HashSet<String>();
         bypass.add( "0" );
         bypass.add( "4" );
-        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]
-            { dn }, bypass );
+        Invocation i = new Invocation( proxy, ctx, "lookup", bypass );
         InvocationStack.getInstance().push( i );
 
         try
@@ -208,8 +205,7 @@
         Set<String> bypass = new HashSet<String>();
         bypass.add( "1" );
         bypass.add( "3" );
-        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]
-            { dn }, bypass );
+        Invocation i = new Invocation( proxy, ctx, "lookup", bypass );
         InvocationStack.getInstance().push( i );
 
         try
@@ -233,8 +229,7 @@
         Context ctx = new DeadContext();
         DirectoryService ds = new MockDirectoryService();
         PartitionNexusProxy proxy = new PartitionNexusProxy( ctx, ds );
-        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]
-            { dn }, PartitionNexusProxy.BYPASS_ALL_COLLECTION );
+        Invocation i = new Invocation( proxy, ctx, "lookup", PartitionNexusProxy.BYPASS_ALL_COLLECTION );
         InvocationStack.getInstance().push( i );
 
         try

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/AttributesSerializerTest.java Sat May 10 09:30:45 2008
@@ -31,7 +31,7 @@
 
 
 /**
- * Tests the {@link AttributeSerializer}.
+ * Tests the {@link EntryAttributeSerializer}.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java Sat May 10 09:30:45 2008
@@ -161,7 +161,7 @@
         Schema schema = schemas.get( "mozilla" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "mozilla" );
-        assertTrue( schema.isDisabled() );
+        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
@@ -175,14 +175,14 @@
         schema = schemas.get( "apachedns" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "apachedns" );
-        assertTrue( schema.isDisabled() );
+        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
         schema = schemas.get( "autofs" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "autofs" );
-        assertTrue( schema.isDisabled() );
+        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
@@ -203,14 +203,14 @@
         schema = schemas.get( "krb5kdc" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "krb5kdc" );
-        assertTrue( schema.isDisabled() );
+        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
         schema = schemas.get( "samba" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "samba" );
-        assertTrue( schema.isDisabled() );
+        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
@@ -231,21 +231,21 @@
         schema = schemas.get( "dhcp" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "dhcp" );
-        assertTrue( schema.isDisabled() );
+        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
         schema = schemas.get( "corba" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "corba" );
-        assertTrue( schema.isDisabled() );
+        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
         schema = schemas.get( "nis" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "nis" );
-        assertTrue( schema.isDisabled() );
+        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java Sat May 10 09:30:45 2008
@@ -30,6 +30,7 @@
 import org.apache.directory.server.core.subtree.RefinementLeafEvaluator;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
@@ -121,7 +122,7 @@
 
         try
         {
-            assertFalse( evaluator.evaluate( new EqualityNode( "", "" ), null ) );
+            assertFalse( evaluator.evaluate( new EqualityNode( "", new ClientStringValue( "" ) ), null ) );
             fail( "should never get here due to an IAE" );
         }
         catch ( IllegalArgumentException iae )
@@ -130,7 +131,7 @@
 
         try
         {
-            assertFalse( evaluator.evaluate( new EqualityNode( "", "" ), new DefaultServerAttribute( "cn", CN ) ) );
+            assertFalse( evaluator.evaluate( new EqualityNode( "", new ClientStringValue( "" ) ), new DefaultServerAttribute( "cn", CN ) ) );
             fail( "should never get here due to an IAE" );
         }
         catch ( IllegalArgumentException iae )
@@ -145,17 +146,17 @@
 
         // positive test
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
-        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", "person" ), objectClasses ) );
+        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "person" ) ), objectClasses ) );
 
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person", "blah" );
-        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", "person" ), objectClasses ) );
+        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "person" ) ), objectClasses ) );
 
         // negative tests
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
-        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", "blah" ), objectClasses ) );
+        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "blah" ) ), objectClasses ) );
 
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "blah" );
-        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", "person" ), objectClasses ) );
+        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "person" ) ), objectClasses ) );
     }
 
 
@@ -164,17 +165,17 @@
         ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
         
         // positive test
-        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", "2.5.6.6" ), objectClasses ) );
+        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "2.5.6.6" ) ), objectClasses ) );
 
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person", "blah" );
-        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", "2.5.6.6" ), objectClasses ) );
+        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "2.5.6.6" ) ), objectClasses ) );
 
         // negative tests
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
-        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", "2.5.6.5" ), objectClasses ) );
+        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "2.5.6.5" ) ), objectClasses ) );
 
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "blah" );
-        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", "2.5.6.5" ), objectClasses ) );
+        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "2.5.6.5" ) ), objectClasses ) );
     }
 
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java Sat May 10 09:30:45 2008
@@ -29,6 +29,7 @@
 import org.apache.directory.server.core.subtree.RefinementLeafEvaluator;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.GreaterEqNode;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -113,7 +114,7 @@
 
         try
         {
-            assertFalse( evaluator.evaluate( new GreaterEqNode( "", "" ), objectClasses ) );
+            assertFalse( evaluator.evaluate( new GreaterEqNode( "", new ClientStringValue( "" ) ), objectClasses ) );
             fail( "should never get here due to an NE" );
         }
         catch ( NamingException ne )
@@ -122,7 +123,7 @@
 
         try
         {
-            assertFalse( evaluator.evaluate( new EqualityNode( "", "" ), objectClasses ) );
+            assertFalse( evaluator.evaluate( new EqualityNode( "", new ClientStringValue( "" ) ), objectClasses ) );
             fail( "should never get here due to an NE" );
         }
         catch ( NamingException ne )
@@ -131,7 +132,7 @@
 
         try
         {
-            assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", "" ), objectClasses ) );
+            assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "" ) ), objectClasses ) );
             fail( "should never get here due to an IAE" );
         }
         catch ( IllegalArgumentException iae )
@@ -141,7 +142,7 @@
         try
         {
             objectClasses = new DefaultServerAttribute( "cn", OBJECT_CLASS );
-            assertFalse( evaluator.evaluate( new EqualityNode( "cn", "" ), objectClasses ) );
+            assertFalse( evaluator.evaluate( new EqualityNode( "cn", new ClientStringValue( "" ) ), objectClasses ) );
             fail( "should never get here due to an IAE" );
         }
         catch ( NamingException ne )
@@ -155,19 +156,19 @@
     {
         // positive test
         ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
-        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", "person" ), objectClasses ) );
+        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "person" ) ), objectClasses ) );
 
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS );
         objectClasses.add( "person" );
         objectClasses.add( "blah" );
-        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", "person" ), objectClasses ) );
+        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "person" ) ), objectClasses ) );
 
         // negative tests
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
-        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", "blah" ), objectClasses ) );
+        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "blah" ) ), objectClasses ) );
 
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "blah" );
-        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", "person" ), objectClasses ) );
+        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "person" ) ), objectClasses ) );
     }
 
 
@@ -176,18 +177,18 @@
         ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
 
         // positive test
-        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", "2.5.6.6" ), objectClasses ) );
+        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "2.5.6.6" ) ), objectClasses ) );
 
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS );
         objectClasses.add( "person" );
         objectClasses.add( "blah" );
-        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", "2.5.6.6" ), objectClasses ) );
+        assertTrue( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "2.5.6.6" ) ), objectClasses ) );
 
         // negative tests
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
-        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", "2.5.6.5" ), objectClasses ) );
+        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "2.5.6.5" ) ), objectClasses ) );
 
         objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "blah" );
-        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", "2.5.6.5" ), objectClasses ) );
+        assertFalse( evaluator.evaluate( new EqualityNode( "objectClass", new ClientStringValue( "2.5.6.5" ) ), objectClasses ) );
     }
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/interceptor-kerberos/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/interceptor-kerberos/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/interceptor-kerberos/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/interceptor-kerberos/pom.xml Sat May 10 09:30:45 2008
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>apacheds-parent</artifactId>
-    <version>1.5.3-SNAPSHOT</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
   <artifactId>apacheds-interceptor-kerberos</artifactId>
   <name>ApacheDS Interceptors for Kerberos</name>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/pom.xml Sat May 10 09:30:45 2008
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>apacheds-parent</artifactId>
-    <version>1.5.3-SNAPSHOT</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
   <artifactId>apacheds-jdbm-store</artifactId>
   <name>ApacheDS JDBM Store</name>
@@ -48,8 +48,9 @@
     </dependency>
 
     <dependency>
-      <groupId>jdbm</groupId>
-      <artifactId>jdbm</artifactId>
+      <groupId>${pom.groupId}</groupId>
+      <version>${pom.version}</version>
+      <artifactId>apacheds-jdbm</artifactId>
     </dependency>
 
     <dependency>
@@ -96,5 +97,24 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java Sat May 10 09:30:45 2008
@@ -30,6 +30,7 @@
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.IndexEntry;
 import org.apache.directory.server.xdbm.Tuple;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.SynchronizedLRUMap;
 
@@ -117,12 +118,10 @@
      * instead with indirection.
      */
 
-
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
     // ----------------------------------------------------------------------
 
-
     public JdbmIndex()
     {
         initialized = false;
@@ -146,7 +145,7 @@
             setAttributeId( attribute.getName() );
         }
 
-        if ( this.wkDirPath ==  null )
+        if ( this.wkDirPath == null )
         {
             this.wkDirPath = wkDirPath;
         }
@@ -233,7 +232,6 @@
     // C O N F I G U R A T I O N   M E T H O D S
     // ------------------------------------------------------------------------
 
-
     /**
      * Protects configuration properties from being set after initialization.
      *
@@ -244,7 +242,7 @@
         if ( initialized )
         {
             throw new IllegalStateException( "The " + property
-                    + " property for an index cannot be set after it has been initialized." );
+                + " property for an index cannot be set after it has been initialized." );
         }
     }
 
@@ -524,7 +522,6 @@
         return forward.has( getNormalized( attrVal ), id );
     }
 
-
     /**
      * @see Index#reverse(Long)
      */
@@ -619,7 +616,7 @@
     // Maintenance Methods 
     // ------------------------------------------------------------------------
 
-    
+
     /**
      * @see org.apache.directory.server.xdbm.Index#close()
      */
@@ -647,13 +644,25 @@
      */
     public K getNormalized( K attrVal ) throws Exception
     {
+        if ( attrVal instanceof Long )
+        {
+            return attrVal;
+        }
+
         //noinspection unchecked
         K normalized = ( K ) keyCache.get( attrVal );
 
         if ( null == normalized )
         {
-            //noinspection unchecked
-            normalized = ( K ) attribute.getEquality().getNormalizer().normalize( attrVal );
+            if ( attrVal instanceof Value<?> )
+            {
+                normalized = attribute.getEquality().getNormalizer().normalize( ( ( Value<?> ) attrVal ).get() );
+            }
+            else
+            {
+                //noinspection unchecked
+                normalized = ( K ) attribute.getEquality().getNormalizer().normalize( attrVal );
+            }
 
             // Double map it so if we use an already normalized
             // value we can get back the same normalized value.

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java Sat May 10 09:30:45 2008
@@ -23,9 +23,13 @@
 import jdbm.RecordManager;
 import jdbm.helper.LongSerializer;
 import jdbm.helper.StringComparator;
+
 import jdbm.helper.Serializer;
 import org.apache.directory.server.xdbm.MasterTable;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerEntrySerializer;
 import org.apache.directory.server.schema.SerializableComparator;
+import org.apache.directory.server.schema.registries.Registries;
 
 import java.io.IOException;
 
@@ -52,7 +56,8 @@
             if ( o1 == null )
             {
                 throw new IllegalArgumentException( "Argument 'obj1' is null" );
-            } else if ( o2 == null )
+            } 
+            else if ( o2 == null )
             {
                 throw new IllegalArgumentException( "Argument 'obj2' is null" );
             }
@@ -116,9 +121,9 @@
      * @param serializer the serializer to use for persisting objects
      * @throws Exception if there is an error opening the Db file.
      */
-    public JdbmMasterTable( RecordManager recMan, Serializer serializer ) throws Exception
+    public JdbmMasterTable( RecordManager recMan, Registries registries ) throws Exception
     {
-        super( DBF, recMan, LONG_COMPARATOR, LongSerializer.INSTANCE, serializer );
+        super( DBF, recMan, LONG_COMPARATOR, LongSerializer.INSTANCE, new ServerEntrySerializer( registries ) );
         adminTbl = new JdbmTable<String,String>( "admin", recMan, STRING_COMPARATOR, null, null );
         String seqValue = adminTbl.get( SEQPROP_KEY );
 
@@ -129,19 +134,43 @@
     }
 
 
-    public E get( Long id ) throws IOException
+    /**
+     * Gets the ServerEntry from this MasterTable.
+     *
+     * @param id the Long id of the entry to retrieve.
+     * @return the ServerEntry with operational attributes and all.
+     * @throws NamingException if there is a read error on the underlying Db.
+     */
+    public E get( Object id ) throws Exception
     {
         return super.get( id );
     }
 
 
+    /**
+     * Puts the ServerEntry into this master table at an index
+     * specified by id.  Used both to create new entries and update existing
+     * ones.
+     *
+     * @param entry the ServerEntry w/ operational attributes
+     * @param id    the Long id of the entry to put
+     * @return the ServerEntry put
+     * @throws Exception if there is a write error on the underlying Db.
+     */
     public E put( Long id, E entry ) throws Exception
     {
         return super.put( id, entry );
     }
 
 
-    public E delete( Long id ) throws IOException
+    /**
+     * Deletes a ServerEntry from the master table at an index specified by id.
+     *
+     * @param id the Long id of the entry to delete
+     * @return the Attributes of the deleted entry
+     * @throws Exception if there is a write error on the underlying Db
+     */
+    public E delete( Long id ) throws Exception
     {
         return super.remove( id );
     }
@@ -160,6 +189,16 @@
     }
 
 
+    /**
+     * Get's the next value from this SequenceBDb.  This has the side-effect of
+     * changing the current sequence values permanently in memory and on disk.
+     * Master table sequence begins at BigInteger.ONE.  The BigInteger.ZERO is
+     * used for the fictitious parent of the suffix root entry.
+     *
+     * @return the current value incremented by one.
+     * @throws Exception if the admin table storing sequences cannot be
+     *                         read and written to.
+     */
     public Long getNextId() throws Exception
     {
         Long nextVal;
@@ -176,7 +215,14 @@
     }
 
 
-    public String getProperty( String property ) throws IOException
+    /**
+     * Gets a persistent property stored in the admin table of this MasterTable.
+     *
+     * @param property the key of the property to get the value of
+     * @return the value of the property
+     * @throws Exception when the underlying admin table cannot be read
+     */
+    public String getProperty( String property ) throws Exception
     {
         synchronized ( adminTbl )
         {
@@ -185,6 +231,13 @@
     }
 
 
+    /**
+     * Sets a persistent property stored in the admin table of this MasterTable.
+     *
+     * @param property the key of the property to set the value of
+     * @param value    the value of the property
+     * @throws Exception when the underlying admin table cannot be writen
+     */
     public void setProperty( String property, String value ) throws Exception
     {
         synchronized ( adminTbl )

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java Sat May 10 09:30:45 2008
@@ -25,11 +25,14 @@
 import jdbm.recman.BaseRecordManager;
 import jdbm.recman.CacheRecordManager;
 
+import org.apache.directory.server.core.entry.DefaultServerAttribute;
+import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.partition.impl.btree.*;
 import org.apache.directory.server.core.cursor.Cursor;
+import org.apache.directory.server.core.entry.ServerStringValue;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
@@ -48,7 +51,6 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.MultiException;
@@ -57,8 +59,6 @@
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -76,7 +76,6 @@
     /** The default cache size is set to 10 000 objects */
     static final int DEFAULT_CACHE_SIZE = 10000;
 
-
     /** the JDBM record manager used by this database */
     private RecordManager recMan;
     /** the normalized suffix DN of this backend database */
@@ -110,17 +109,20 @@
     private JdbmIndex<Long,E> subAliasIdx;
     /** a system index on aliasedObjectName attribute */
     private JdbmIndex<String,E> aliasIdx;
-    
+
     /** a system index on the entries of descendants of root DN*/
     private JdbmIndex<Long,E> subLevelIdx;
     
     /** Two static declaration to avoid lookup all over the code */
     private static AttributeType OBJECT_CLASS_AT;
     private static AttributeType ALIASED_OBJECT_NAME_AT;
-    
+
+    /** A pointer on the global registries */
+    private Registries registries;
+
     /** A pointer on the AT registry */
     private AttributeTypeRegistry attributeTypeRegistry;
-    
+
     /** A pointer on the OID registry */
     private OidRegistry oidRegistry;
 
@@ -129,11 +131,11 @@
     // C O N S T R U C T O R S
     // ------------------------------------------------------------------------
 
-    
+
     /**
      * Creates a store based on JDBM B+Trees.
      */
-    public JdbmStore() 
+    public JdbmStore()
     {
     }
 
@@ -241,20 +243,18 @@
     // -----------------------------------------------------------------------
 
 
-
     /**
      * Initialize the JDBM storage system.
      *
-     * @param oidRegistry an OID registry to resolve numeric identifiers from names
-     * @param attributeTypeRegistry an attributeType specification registry to lookup type specs
-     * @throws NamingException on failure to lookup elements in registries
+     * @param registries the schema registries
+     * @throws Exception on failure to lookup elements in registries
      * @throws Exception on failure to create database files
      */
-    public synchronized void init( OidRegistry oidRegistry, AttributeTypeRegistry attributeTypeRegistry )
-            throws Exception
+    public synchronized void init( Registries registries ) throws Exception
     {
-        this.oidRegistry = oidRegistry;
-        this.attributeTypeRegistry = attributeTypeRegistry;
+        this.registries = registries;
+        this.oidRegistry = registries.getOidRegistry();
+        this.attributeTypeRegistry = registries.getAttributeTypeRegistry();
 
         OBJECT_CLASS_AT = attributeTypeRegistry.lookup( SchemaConstants.OBJECT_CLASS_AT );
         ALIASED_OBJECT_NAME_AT = attributeTypeRegistry.lookup( SchemaConstants.ALIASED_OBJECT_NAME_AT );
@@ -271,25 +271,18 @@
         if ( cacheSize < 0 )
         {
             cacheSize = DEFAULT_CACHE_SIZE;
-
-            if ( LOG.isDebugEnabled() )
-            {
-                LOG.debug( "Using the default entry cache size of {} for {} partition", cacheSize, name );
-            }
+            LOG.debug( "Using the default entry cache size of {} for {} partition", cacheSize, name );
         }
         else
         {
-            if ( LOG.isDebugEnabled() )
-            {
-                LOG.debug( "Using the custom configured cache size of {} for {} partition", cacheSize, name );
-            }
+            LOG.debug( "Using the custom configured cache size of {} for {} partition", cacheSize, name );
         }
 
         // Now, create the entry cache for this partition
         recMan = new CacheRecordManager( base, new MRU( cacheSize ) );
 
         // Create the master table (the table wcontaining all the entries)
-        master = new JdbmMasterTable<Attributes>( recMan, new AttributesSerializer() );
+        master = new JdbmMasterTable<E>( recMan, registries );
 
         // -------------------------------------------------------------------
         // Initializes the user and system indices
@@ -297,6 +290,9 @@
 
         setupSystemIndices();
         setupUserIndices();
+
+        contextEntry.getDn().normalize( attributeTypeRegistry.getNormalizerMapping() );
+
         initSuffixEntry3( suffixDn, contextEntry );
 
         // We are done !
@@ -308,7 +304,7 @@
     {
         if ( systemIndices.size() > 0 )
         {
-            HashMap<String,JdbmIndex> tmp = new HashMap<String,JdbmIndex>();
+            HashMap<String, JdbmIndex> tmp = new HashMap<String, JdbmIndex>();
             for ( JdbmIndex index : systemIndices.values() )
             {
                 String oid = oidRegistry.getOid( index.getAttributeId() );
@@ -388,7 +384,7 @@
     {
         if ( userIndices != null && userIndices.size() > 0 )
         {
-            HashMap<String,JdbmIndex> tmp = new HashMap<String,JdbmIndex>();
+            HashMap<String, JdbmIndex> tmp = new HashMap<String, JdbmIndex>();
             for ( JdbmIndex index : userIndices.values() )
             {
                 String oid = oidRegistry.getOid( index.getAttributeId() );
@@ -399,7 +395,7 @@
         }
         else
         {
-            userIndices = new HashMap<String,JdbmIndex>();
+            userIndices = new HashMap<String, JdbmIndex>();
         }
     }
 
@@ -410,22 +406,19 @@
      *  
      * @param suffix the suffix for the store
      * @param entry the root entry of the store
-     * @throws NamingException on failre to add the root entry
+     * @throws NamingException on failure to add the root entry
      * @throws Exception failure to access btrees
      */
     protected void initSuffixEntry3( String suffix, ServerEntry entry ) throws Exception
     {
         // add entry for context, if it does not exist
-        Attributes suffixOnDisk = getSuffixEntry();
-        
+        ServerEntry suffixOnDisk = getSuffixEntry();
+
         if ( suffixOnDisk == null )
         {
             LdapDN dn = new LdapDN( suffix );
             LdapDN normalizedSuffix = LdapDN.normalize( dn, attributeTypeRegistry.getNormalizerMapping() );
-            
-            //add( normalizedSuffix, entry );
-            // TODO just start using ServerEntry here!!!!
-            add( normalizedSuffix, ServerEntryUtils.toAttributesImpl( entry ) );
+            add( normalizedSuffix, entry );
         }
     }
 
@@ -450,12 +443,12 @@
         array.addAll( systemIndices.values() );
         MultiException errors = new MultiException( "Errors encountered on destroy()" );
 
-        for ( JdbmIndex index:array )
+        for ( JdbmIndex index : array )
         {
             try
             {
                 index.close();
-                LOG.debug( "Closed {} index for {} partition.",  index.getAttributeId(), suffixDn );
+                LOG.debug( "Closed {} index for {} partition.", index.getAttributeId(), suffixDn );
             }
             catch ( Throwable t )
             {
@@ -467,7 +460,7 @@
         try
         {
             master.close();
-            LOG.debug( "Closed master table for {} partition.",  suffixDn );
+            LOG.debug( "Closed master table for {} partition.", suffixDn );
         }
         catch ( Throwable t )
         {
@@ -478,7 +471,7 @@
         try
         {
             recMan.close();
-            LOG.debug( "Closed record manager for {} partition.",  suffixDn );
+            LOG.debug( "Closed record manager for {} partition.", suffixDn );
         }
         catch ( Throwable t )
         {
@@ -531,7 +524,7 @@
         array.add( subLevelIdx );
         
         // Sync all user defined userIndices
-        for ( Index idx:array )
+        for ( Index idx : array )
         {
             idx.sync();
         }
@@ -578,7 +571,6 @@
         return new HashSet<Index>( userIndices.values() );
     }
 
-
     public void addIndex( Index index ) throws NamingException
     {
         userIndices.put( index.getAttributeId(), convertIndex( index ) );
@@ -623,7 +615,7 @@
     {
         protect( "aliasIndex" );
         aliasIdx = ( JdbmIndex<String,E> ) convertIndex( index );
-        systemIndices.put( index.getAttributeId() , aliasIdx );
+        systemIndices.put( index.getAttributeId(), aliasIdx );
     }
 
 
@@ -755,7 +747,6 @@
             throw new IndexNotFoundException( "Failed to identify OID for: " + id, id, e );
         }
 
-
         if ( systemIndices.containsKey( id ) )
         {
             return systemIndices.get( id );
@@ -1002,8 +993,8 @@
         }
     }
 
-    
-    public void add( LdapDN normName, Attributes entry ) throws Exception
+
+    public void add( LdapDN normName, ServerEntry entry ) throws Exception
     {
         Long id;
         Long parentId;
@@ -1017,7 +1008,7 @@
         //
 
         LdapDN parentDn = null;
-        
+
         if ( normName.equals( normSuffix ) )
         {
             parentId = 0L;
@@ -1035,7 +1026,7 @@
             throw new LdapNameNotFoundException( "Id for parent '" + parentDn + "' not found!" );
         }
 
-        Attribute objectClass = AttributeUtils.getAttribute( entry, OBJECT_CLASS_AT );
+        EntryAttribute objectClass = entry.get( OBJECT_CLASS_AT );
 
         if ( objectClass == null )
         {
@@ -1048,17 +1039,15 @@
 
         if ( objectClass.contains( SchemaConstants.ALIAS_OC ) )
         {
-            Attribute aliasAttr = AttributeUtils.getAttribute( entry, ALIASED_OBJECT_NAME_AT );
-            addAliasIndices( id, normName, ( String ) aliasAttr.get() );
+            EntryAttribute aliasAttr = entry.get( ALIASED_OBJECT_NAME_AT );
+            addAliasIndices( id, normName, aliasAttr.getString() );
         }
 
-
-        if ( ! Character.isDigit( normName.toNormName().charAt( 0 ) ) )
+        if ( !Character.isDigit( normName.toNormName().charAt( 0 ) ) )
         {
             throw new IllegalStateException( "Not a normalized name: " + normName.toNormName() );
         }
 
-
         ndnIdx.add( normName.toNormName(), id );
         updnIdx.add( normName.getUpName(), id );
         oneLevelIdx.add( parentId, id );
@@ -1071,24 +1060,20 @@
         }
         
         // Now work on the user defined userIndices
-        NamingEnumeration<String> list = entry.getIDs();
-        
-        while ( list.hasMore() )
+        for ( EntryAttribute attribute : entry )
         {
-            String attributeId = list.next();
-            String attributeOid = oidRegistry.getOid( attributeId );
+            String attributeOid = ( ( ServerAttribute ) attribute ).getAttributeType().getOid();
 
             if ( hasUserIndexOn( attributeOid ) )
             {
                 Index idx = getUserIndex( attributeOid );
-                
+
                 // here lookup by attributeId is ok since we got attributeId from 
                 // the entry via the enumeration - it's in there as is for sure
-                NamingEnumeration<?> values = entry.get( attributeId ).getAll();
 
-                while ( values.hasMore() )
+                for ( Value<?> value : attribute )
                 {
-                    idx.add( values.next(), id );
+                    idx.add( value.get(), id );
                 }
 
                 // Adds only those attributes that are indexed
@@ -1097,7 +1082,7 @@
         }
 
         master.put( id, entry );
-        
+
         if ( isSyncOnWrite )
         {
             sync();
@@ -1105,7 +1090,7 @@
     }
 
 
-    public Attributes lookup( Long id ) throws Exception
+    public ServerEntry lookup( Long id ) throws Exception
     {
         return master.get( id );
     }
@@ -1119,12 +1104,11 @@
                 "Deletion of the suffix entry is not permitted.", ResultCodeEnum.UNWILLING_TO_PERFORM );
         }
 
-        Attributes entry = lookup( id );
+        ServerEntry entry = lookup( id );
         Long parentId = getParentId( id );
-        NamingEnumeration<String> attrs = entry.getIDs();
 
-        Attribute objectClass = AttributeUtils.getAttribute( entry, OBJECT_CLASS_AT );
-        
+        EntryAttribute objectClass = entry.get( OBJECT_CLASS_AT );
+
         if ( objectClass.contains( SchemaConstants.ALIAS_OC ) )
         {
             dropAliasIndices( id );
@@ -1145,10 +1129,9 @@
             oneLevelIdx.drop( parentId, id );
         }
 
-        while ( attrs.hasMore() )
+        for ( EntryAttribute attribute : entry )
         {
-            String attributeId = attrs.next();
-            String attributeOid = oidRegistry.getOid( attributeId );
+            String attributeOid = ( ( ServerAttribute ) attribute ).getAttributeType().getOid();
 
             if ( hasUserIndexOn( attributeOid ) )
             {
@@ -1156,11 +1139,9 @@
 
                 // here lookup by attributeId is ok since we got attributeId from 
                 // the entry via the enumeration - it's in there as is for sure
-                NamingEnumeration<?> values = entry.get( attributeId ).getAll();
-
-                while ( values.hasMore() )
+                for ( Value<?> value : attribute )
                 {
-                    index.drop( values.next(), id );
+                    index.drop( value, id );
                 }
 
                 existanceIdx.drop( attributeOid, id );
@@ -1168,7 +1149,7 @@
         }
 
         master.delete( id );
-        
+
         if ( isSyncOnWrite )
         {
             sync();
@@ -1211,7 +1192,7 @@
     }
 
 
-    public Attributes getSuffixEntry() throws Exception
+    public ServerEntry getSuffixEntry() throws Exception
     {
         Long id = getEntryId( normSuffix.toNormName() );
 
@@ -1246,10 +1227,10 @@
      * @param mods the attribute and values to add 
      * @throws Exception if index alteration or attribute addition fails
      */
-    private void add( Long id, Attributes entry, EntryAttribute mods ) throws Exception
+    private void add( Long id, ServerEntry entry, EntryAttribute mods ) throws Exception
     {
         String modsOid = oidRegistry.getOid( mods.getId() );
-        
+
         if ( hasUserIndexOn( modsOid ) )
         {
             Index idx = getUserIndex( modsOid );
@@ -1264,17 +1245,10 @@
 
         // add all the values in mods to the same attribute in the entry
         AttributeType type = attributeTypeRegistry.lookup( modsOid );
-        Attribute entryAttrToAddTo = AttributeUtils.getAttribute( entry, type );
-
-        if ( entryAttrToAddTo == null )
-        {
-            entryAttrToAddTo = new AttributeImpl( mods.getId() );
-            entry.put( entryAttrToAddTo );
-        }
 
-        for ( Value<?> value:mods )
+        for ( Value<?> value : mods )
         {
-            entryAttrToAddTo.add( value.get() );
+            entry.add( type, value );
         }
 
         if ( modsOid.equals( oidRegistry.getOid( SchemaConstants.ALIASED_OBJECT_NAME_AT ) ) )
@@ -1298,10 +1272,10 @@
      * @param mods the attribute and its values to delete
      * @throws Exception if index alteration or attribute modification fails.
      */
-    private void remove( Long id, Attributes entry, EntryAttribute mods ) throws Exception
+    private void remove( Long id, ServerEntry entry, EntryAttribute mods ) throws Exception
     {
         String modsOid = oidRegistry.getOid( mods.getId() );
-        
+
         if ( hasUserIndexOn( modsOid ) )
         {
             Index idx = getUserIndex( modsOid );
@@ -1326,21 +1300,28 @@
          */
         if ( mods.size() == 0 )
         {
-            AttributeUtils.removeAttribute( attrType, entry );
+            entry.removeAttributes( attrType );
         }
         else
         {
-            Attribute entryAttr = AttributeUtils.getAttribute( entry, attrType );
-            
-            for ( Value<?> value:mods )
+            EntryAttribute entryAttr = entry.get( attrType );
+
+            for ( Value<?> value : mods )
             {
-                entryAttr.remove( value.get() );
+                if ( value instanceof ServerStringValue )
+                {
+                    entryAttr.remove( ( String ) value.get() );
+                }
+                else
+                {
+                    entryAttr.remove( ( byte[] ) value.get() );
+                }
             }
 
             // if nothing is left just remove empty attribute
             if ( entryAttr.size() == 0 )
             {
-                entry.remove( entryAttr.getID() );
+                entry.removeAttributes( entryAttr.getId() );
             }
         }
 
@@ -1361,13 +1342,13 @@
      * @param id the primary key of the entry
      * @param entry the entry to alter
      * @param mods the replacement attribute and values
-     * @throws NamingException if index alteration or attribute modification 
+     * @throws Exception if index alteration or attribute modification 
      * fails.
      */
-    private void replace( Long id, Attributes entry, EntryAttribute mods ) throws Exception
+    private void replace( Long id, ServerEntry entry, EntryAttribute mods ) throws Exception
     {
         String modsOid = oidRegistry.getOid( mods.getId() );
-        
+
         if ( hasUserIndexOn( modsOid ) )
         {
             Index idx = getUserIndex( modsOid );
@@ -1387,7 +1368,7 @@
         }
 
         String aliasAttributeOid = oidRegistry.getOid( SchemaConstants.ALIASED_OBJECT_NAME_AT );
-        
+
         if ( modsOid.equals( aliasAttributeOid ) )
         {
             dropAliasIndices( id );
@@ -1396,11 +1377,12 @@
         // replaces old attributes with new modified ones if they exist
         if ( mods.size() > 0 )
         {
-            entry.put( ServerEntryUtils.toAttributeImpl( mods ) );
+            entry.put( mods );
         }
-        else  // removes old attributes if new replacements do not exist
+        else
+        // removes old attributes if new replacements do not exist
         {
-            entry.remove( mods.getId() );
+            entry.remove( mods );
         }
 
         if ( modsOid.equals( aliasAttributeOid ) && mods.size() > 0 )
@@ -1414,34 +1396,34 @@
     public void modify( LdapDN dn, ModificationOperation modOp, ServerEntry mods ) throws Exception
     {
         Long id = getEntryId( dn.toString() );
-        Attributes entry = master.get( id );
+        ServerEntry entry = master.get( id );
 
-        for ( AttributeType attributeType:mods.getAttributeTypes() )
+        for ( AttributeType attributeType : mods.getAttributeTypes() )
         {
             EntryAttribute attr = mods.get( attributeType );
 
             switch ( modOp )
             {
-                case ADD_ATTRIBUTE :
+                case ADD_ATTRIBUTE:
                     add( id, entry, attr );
                     break;
-                
-                case REMOVE_ATTRIBUTE :
+
+                case REMOVE_ATTRIBUTE:
                     remove( id, entry, attr );
                     break;
-                
-                case REPLACE_ATTRIBUTE :
+
+                case REPLACE_ATTRIBUTE:
                     replace( id, entry, attr );
-    
+
                     break;
-                    
+
                 default:
                     throw new NamingException( "Unidentified modification operation" );
             }
         }
 
         master.put( id, entry );
-        
+
         if ( isSyncOnWrite )
         {
             sync();
@@ -1452,23 +1434,23 @@
     public void modify( LdapDN dn, List<Modification> mods ) throws Exception
     {
         Long id = getEntryId( dn.toString() );
-        Attributes entry = master.get( id );
+        ServerEntry entry = master.get( id );
 
         for ( Modification mod : mods )
         {
-            ServerAttribute attrMods = (ServerAttribute)mod.getAttribute();
+            ServerAttribute attrMods = ( ServerAttribute ) mod.getAttribute();
 
             switch ( mod.getOperation() )
             {
-                case ADD_ATTRIBUTE :
+                case ADD_ATTRIBUTE:
                     add( id, entry, attrMods );
                     break;
 
-                case REMOVE_ATTRIBUTE :
-                    remove(id, entry, attrMods);
+                case REMOVE_ATTRIBUTE:
+                    remove( id, entry, attrMods );
                     break;
 
-                case REPLACE_ATTRIBUTE :
+                case REPLACE_ATTRIBUTE:
                     replace( id, entry, attrMods );
                     break;
 
@@ -1478,7 +1460,7 @@
         }
 
         master.put( id, entry );
-        
+
         if ( isSyncOnWrite )
         {
             sync();
@@ -1507,8 +1489,8 @@
         String newRdnAttr = newRdn.getNormType();
         String newRdnValue = ( String ) newRdn.getValue();
         Long id = getEntryId( dn.getNormName() );
-        Attributes entry = lookup( id );
-        LdapDN updn = new LdapDN( getEntryUpdn( id ) );
+        ServerEntry entry = lookup( id );
+        LdapDN updn = entry.getDn();
 
         /* 
          * H A N D L E   N E W   R D N
@@ -1520,20 +1502,20 @@
          */
 
         AttributeType newRdnAttrType = attributeTypeRegistry.lookup( newRdn.getNormType() );
-        Attribute rdnAttr = AttributeUtils.getAttribute( entry, newRdnAttrType );
-        
+        EntryAttribute rdnAttr = entry.get( newRdnAttrType );
+
         if ( rdnAttr == null )
         {
-            rdnAttr = new AttributeImpl( newRdnAttr );
+            rdnAttr = new DefaultServerAttribute( newRdnAttrType );
         }
 
         // add the new Rdn value only if it is not already present in the entry
-        if ( ! AttributeUtils.containsValue( rdnAttr, newRdnValue, newRdnAttrType ) )
+        if ( !rdnAttr.contains( newRdnValue ) )
         {
-            rdnAttr.add( newRdn.getUpValue() );
+            rdnAttr.add( ( String ) newRdn.getUpValue() );
         }
 
-        entry.put( rdnAttr );
+        //entry.put( rdnAttr );
 
         if ( hasUserIndexOn( newRdn.getNormType() ) )
         {
@@ -1566,8 +1548,8 @@
             Rdn oldRdn = updn.getRdn();
             AttributeType oldRdnAttrType = attributeTypeRegistry.lookup( oldRdn.getNormType() );
 
-            Attribute oldRdnAttr = AttributeUtils.getAttribute( entry, oldRdnAttrType );
-            AttributeUtils.removeValue( oldRdnAttr, oldRdn.getUpValue(), oldRdnAttrType );
+            EntryAttribute oldRdnAttr = entry.get( oldRdnAttrType );
+            oldRdnAttr.remove( ( String ) oldRdn.getUpValue() );
 
             if ( hasUserIndexOn( oldRdn.getNormType() ) )
             {
@@ -1602,9 +1584,13 @@
 
         // gotta normalize cuz this thang is cloned and not normalized by default
         newUpdn.normalize( attributeTypeRegistry.getNormalizerMapping() );
-        
+
         modifyDn( id, newUpdn, false ); // propagate dn changes
-        
+
+        // Update the current entry
+        entry.setDn( newUpdn );
+        master.put( entry, id );
+
         if ( isSyncOnWrite )
         {
             sync();
@@ -1636,7 +1622,7 @@
         // Now we can handle the appropriate name userIndices for all cases
         ndnIdx.drop( id );
 
-        if ( ! updn.isNormalized() )
+        if ( !updn.isNormalized() )
         {
             updn.normalize( attributeTypeRegistry.getNormalizerMapping() );
         }
@@ -1684,6 +1670,11 @@
             rdnDN.normalize( attributeTypeRegistry.getNormalizerMapping() );
             childUpdn.add( rdnDN.getRdn() );
 
+            // Modify the child
+            ServerEntry entry = lookup( childId );
+            entry.setDn( childUpdn );
+            master.put( childId, entry );
+
             // Recursively change the names of the children below
             modifyDn( childId, childUpdn, isMove );
         }
@@ -1695,7 +1686,7 @@
         Long childId = getEntryId( oldChildDn.toString() );
         rename( oldChildDn, newRdn, deleteOldRdn );
         move( oldChildDn, childId, newParentDn );
-        
+
         if ( isSyncOnWrite )
         {
             sync();
@@ -1707,7 +1698,7 @@
     {
         Long childId = getEntryId( oldChildDn.toString() );
         move( oldChildDn, childId, newParentDn );
-        
+
         if ( isSyncOnWrite )
         {
             sync();

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java Sat May 10 09:30:45 2008
@@ -156,7 +156,7 @@
             // explicitly managed by this code.  Value serialization is delegated to these
             // marshallers.
 
-            bt = BTree.createInstance( recMan, keyComparator, keySerializer, null );
+            bt = BTree.createInstance( recMan, keyComparator, keySerializer, valueSerializer );
             recId = bt.getRecid();
             recMan.setNamedObject( name, recId );
             recId = recMan.insert( 0 );
@@ -165,6 +165,7 @@
         else // Load existing BTree
         {
             bt = BTree.load( recMan, recId );
+            bt.setValueSerializer( valueSerializer );
             recId = recMan.getNamedObject( name + SZSUFFIX );
             count = ( Integer ) recMan.fetch( recId );
         }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/kerberos-shared/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/kerberos-shared/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/kerberos-shared/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/kerberos-shared/pom.xml Sat May 10 09:30:45 2008
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>apacheds-parent</artifactId>
-    <version>1.5.3-SNAPSHOT</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
   <artifactId>apacheds-kerberos-shared</artifactId>
   <name>ApacheDS Protocol Kerberos Shared</name>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/mina-xbean-spring/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/mina-xbean-spring/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/mina-xbean-spring/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/mina-xbean-spring/pom.xml Sat May 10 09:30:45 2008
@@ -24,7 +24,7 @@
   <parent>
     <artifactId>apacheds-parent</artifactId>
     <groupId>org.apache.directory.server</groupId>
-    <version>1.5.2-SNAPSHOT</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.directory.mina</groupId>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/mitosis/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/mitosis/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/mitosis/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/mitosis/pom.xml Sat May 10 09:30:45 2008
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>apacheds-parent</artifactId>
-    <version>1.5.3-SNAPSHOT</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
   <artifactId>mitosis</artifactId>
   <name>ApacheDS replication</name>
@@ -112,6 +112,24 @@
     </dependency>
   </dependencies>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
   <profiles>
     <profile>
     <id>no-integration-or-perf-tests</id>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java Sat May 10 09:30:45 2008
@@ -48,8 +48,11 @@
 {
     private static final long serialVersionUID = 2294492811671880570L;
 
-    private final LdapDN normalizedName;
+    /** The entry to add */
     private final Attributes entry;
+    
+    /** The entry's dn */
+    private final LdapDN dn;
 
 
     /**
@@ -57,41 +60,34 @@
      * 
      * @param entry an entry
      */
-    public AddEntryOperation( CSN csn, LdapDN normalizedName, ServerEntry entry )
+    public AddEntryOperation( CSN csn, ServerEntry entry )
     {
         super( csn );
 
-        assert normalizedName != null;
         assert entry != null;
 
-        this.normalizedName = normalizedName;
         this.entry = ServerEntryUtils.toAttributesImpl( entry );
-    }
-
-
-    public String toString()
-    {
-        return super.toString() + ": [" + normalizedName + "].new( " + entry + " )";
+        this.dn = entry.getDn();
     }
 
 
     protected void execute0( PartitionNexus nexus, ReplicationStore store, Registries registries )
         throws NamingException
     {
-        if ( !EntryUtil.isEntryUpdatable( registries, nexus, normalizedName, getCSN() ) )
+        if ( !EntryUtil.isEntryUpdatable( registries, nexus, dn, getCSN() ) )
         {
             return;
         }
         
-        EntryUtil.createGlueEntries( registries, nexus, normalizedName, false );
+        EntryUtil.createGlueEntries( registries, nexus, dn, false );
 
         // Replace the entry if an entry with the same name exists.
-        if ( nexus.lookup( new LookupOperationContext( registries, normalizedName ) ) != null )
+        if ( nexus.lookup( new LookupOperationContext( registries, dn ) ) != null )
         {
-            recursiveDelete( nexus, normalizedName, registries );
+            recursiveDelete( nexus, dn, registries );
         }
 
-        nexus.add( new AddOperationContext( registries, normalizedName, ServerEntryUtils.toServerEntry( entry, normalizedName, registries ) ) );
+        nexus.add( new AddOperationContext( registries, ServerEntryUtils.toServerEntry( entry, dn, registries ) ) );
     }
 
 
@@ -109,7 +105,7 @@
 
         while ( ne.hasMore() )
         {
-        	ServerSearchResult sr = ne.next();
+            ServerSearchResult sr = ne.next();
             LdapDN dn = sr.getDn();
             dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
             recursiveDelete( nexus, dn, registries );
@@ -117,4 +113,10 @@
         
         nexus.delete( new DeleteOperationContext( registries, normalizedName ) );
     }
+
+
+    public String toString()
+    {
+        return super.toString() + ": [" + dn + "].new( " + entry + " )";
+    }
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java Sat May 10 09:30:45 2008
@@ -136,7 +136,7 @@
         // MODIFY operation)
         cloneEntry.put( Constants.ENTRY_CSN, csn.toOctetString() );
 
-        return new AddEntryOperation( csn, normalizedName, cloneEntry );
+        return new AddEntryOperation( csn, cloneEntry );
     }
 
 
@@ -277,7 +277,7 @@
 
         while ( e.hasMore() )
         {
-        	ServerSearchResult sr = e.next();
+            ServerSearchResult sr = e.next();
 
             // Get the name of the old entry
             LdapDN oldEntryName = sr.getDn();

Modified: directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java Sat May 10 09:30:45 2008
@@ -130,7 +130,7 @@
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, SchemaConstants.EXTENSIBLE_OBJECT_OC );
 
         // And add it to the nexus.
-        nexus.add( new AddOperationContext( registries, name, entry ) );
+        nexus.add( new AddOperationContext( registries, entry ) );
     }
 
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java Sat May 10 09:30:45 2008
@@ -131,9 +131,7 @@
         ctx.getSession().setWriteTimeout( ctx.getConfiguration().getResponseTimeout() );
 
         // Check update vector of the remote peer periodically.
-        ctx.getSession().setIdleTime(
-        		IdleStatus.BOTH_IDLE,
-        		ctx.getConfiguration().getReplicationInterval());
+        ctx.getSession().setIdleTime( IdleStatus.BOTH_IDLE, ctx.getConfiguration().getReplicationInterval() );
     }
 
 
@@ -182,8 +180,8 @@
     public void messageSent( ReplicationContext ctx, Object message ) throws Exception
     {
     }
-    
-    
+
+
     /**
      * A helper to write a message and schedule that message for expiration.
      *
@@ -202,8 +200,8 @@
     {
         if ( SessionLog.isWarnEnabled( ctx.getSession() ) )
         {
-            SessionLog.warn( ctx.getSession(), "[Replica-"+ ctx.getConfiguration().getReplicaId()
-                    +"] Unexpected exception.", cause );
+            SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+                + "] Unexpected exception.", cause );
         }
         ctx.getSession().close();
     }
@@ -219,8 +217,8 @@
     {
         if ( message.getResponseCode() != Constants.OK )
         {
-            SessionLog.warn( ctx.getSession(), "[Replica-"+ ctx.getConfiguration().getReplicaId() +
-                    "] Login attempt failed: " + message.getResponseCode() );
+            SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+                + "] Login attempt failed: " + message.getResponseCode() );
             ctx.getSession().close();
             return;
         }
@@ -230,7 +228,7 @@
             if ( replica.getId().equals( message.getReplicaId() ) )
             {
                 if ( replica.getAddress().getAddress().equals(
-                        ( ( InetSocketAddress ) ctx.getSession().getRemoteAddress() ).getAddress() ) )
+                    ( ( InetSocketAddress ) ctx.getSession().getRemoteAddress() ).getAddress() ) )
                 {
                     ctx.setPeer( replica );
                     ctx.setState( State.READY );
@@ -238,17 +236,17 @@
                 }
                 else
                 {
-                    SessionLog.warn( ctx.getSession(), "[Replica-"+ ctx.getConfiguration().getReplicaId()
-                            + "] Peer address mismatches: "
-                            + ctx.getSession().getRemoteAddress() + " (expected: " + replica.getAddress() );
+                    SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+                        + "] Peer address mismatches: " + ctx.getSession().getRemoteAddress() + " (expected: "
+                        + replica.getAddress() );
                     ctx.getSession().close();
                     return;
                 }
             }
         }
 
-        SessionLog.warn( ctx.getSession(), "[Replica-"+ ctx.getConfiguration().getReplicaId() +
-                    "] Unknown peer replica ID: " + message.getReplicaId() );
+        SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+            + "] Unknown peer replica ID: " + message.getReplicaId() );
         ctx.getSession().close();
     }
 
@@ -262,27 +260,26 @@
         if ( ctx.getState() == State.READY && ctx.getScheduledExpirations() <= 0
             && ctx.getSession().getScheduledWriteRequests() <= 0 )
         {
-        	// Initiate replication process asking update vector.
-            if ( SessionLog.isDebugEnabled( ctx.getSession() ) ) {
-                SessionLog.debug( ctx.getSession(), "(" +
-                    ctx.getConfiguration().getReplicaId().getId() + "->" +
-                    (ctx.getPeer() != null ? ctx.getPeer().getId().getId() : "null") +
-                    ") Beginning replication. " );
+            // Initiate replication process asking update vector.
+            if ( SessionLog.isDebugEnabled( ctx.getSession() ) )
+            {
+                SessionLog.debug( ctx.getSession(), "(" + ctx.getConfiguration().getReplicaId().getId() + "->"
+                    + ( ctx.getPeer() != null ? ctx.getPeer().getId().getId() : "null" ) + ") Beginning replication. " );
             }
-        	ctx.getSession().write( new BeginLogEntriesMessage( ctx.getNextSequence() ) );
-        	return true;
+            ctx.getSession().write( new BeginLogEntriesMessage( ctx.getNextSequence() ) );
+            return true;
         }
         else
         {
-            if ( SessionLog.isDebugEnabled( ctx.getSession() ) ) {
-                SessionLog.debug( ctx.getSession(), "(" +
-                    ctx.getConfiguration().getReplicaId().getId() + "->" +
-                    (ctx.getPeer() != null ? ctx.getPeer().getId().getId() : "null") +
-                    ") Couldn't begin replication.  State:" + ctx.getState() + ", scheduledExpirations:"
-                        + ctx.getScheduledExpirations() +
-                        ", scheduledWriteRequests:" + ctx.getSession().getScheduledWriteRequests() );
+            if ( SessionLog.isDebugEnabled( ctx.getSession() ) )
+            {
+                SessionLog.debug( ctx.getSession(), "(" + ctx.getConfiguration().getReplicaId().getId() + "->"
+                    + ( ctx.getPeer() != null ? ctx.getPeer().getId().getId() : "null" )
+                    + ") Couldn't begin replication.  State:" + ctx.getState() + ", scheduledExpirations:"
+                    + ctx.getScheduledExpirations() + ", scheduledWriteRequests:"
+                    + ctx.getSession().getScheduledWriteRequests() );
             }
-        	return false;
+            return false;
         }
     }
 
@@ -291,8 +288,8 @@
     {
         if ( message.getResponseCode() != Constants.OK )
         {
-            SessionLog.warn( ctx.getSession(), "[Replica-"+ ctx.getConfiguration().getReplicaId() +
-                    "] Remote peer failed to execute a log entry." );
+            SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+                + "] Remote peer failed to execute a log entry." );
             ctx.getSession().close();
         }
     }
@@ -316,8 +313,8 @@
         }
         catch ( Exception e )
         {
-            SessionLog.warn( ctx.getSession(), "[Replica-"+ ctx.getConfiguration().getReplicaId() +
-                    "] Failed to get update vector.", e );
+            SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+                + "] Failed to get update vector.", e );
             ctx.getSession().close();
             return;
         }
@@ -327,14 +324,14 @@
         {
             if ( myPV.size() > 0 && yourUV.size() == 0 )
             {
-                SessionLog.warn( ctx.getSession(), "[Replica-"+ ctx.getConfiguration().getReplicaId() +
-                    "] Starting a whole DIT transfer." );
+                SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+                    + "] Starting a whole DIT transfer." );
                 sendAllEntries( ctx );
             }
             else
             {
-                SessionLog.warn( ctx.getSession(), "[Replica-"+ ctx.getConfiguration().getReplicaId() +
-                    "] Starting a partial replication log transfer." );
+                SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+                    + "] Starting a partial replication log transfer." );
                 sendReplicationLogs( ctx, myPV, yourUV );
             }
         }
@@ -351,24 +348,24 @@
         ServerEntry rootDSE = ctx.getDirectoryService().getPartitionNexus().getRootDSE( null );
 
         EntryAttribute namingContextsAttr = rootDSE.get( SchemaConstants.NAMING_CONTEXTS_AT );
-        
+
         if ( namingContextsAttr == null || namingContextsAttr.size() == 0 )
         {
-            SessionLog.warn( ctx.getSession(), "[Replica-"+ ctx.getConfiguration().getReplicaId() +
-                    "] No namingContexts attributes in rootDSE." );
+            SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+                + "] No namingContexts attributes in rootDSE." );
             return;
         }
 
         // Iterate all context partitions to send all entries of them.
-        for ( Value<?> namingContext:namingContextsAttr )
+        for ( Value<?> namingContext : namingContextsAttr )
         {
             // Convert attribute value to JNDI name.
             LdapDN contextName;
 
-            contextName = new LdapDN( (String)namingContext.get() );
+            contextName = new LdapDN( ( String ) namingContext.get() );
 
-            SessionLog.info( ctx.getSession(), "[Replica-"+ ctx.getConfiguration().getReplicaId() +
-                    "] Sending entries under '" + contextName + '\'' );
+            SessionLog.info( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+                + "] Sending entries under '" + contextName + '\'' );
 
             Map<String, OidNormalizer> mapping = ctx.getDirectoryService().getRegistries().getAttributeTypeRegistry()
                 .getNormalizerMapping();
@@ -384,19 +381,19 @@
         SearchControls ctrl = new SearchControls();
         ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
         NamingEnumeration<ServerSearchResult> e = ctx.getDirectoryService().getPartitionNexus().search(
-            new SearchOperationContext( ctx.getDirectoryService().getRegistries(), contextName, AliasDerefMode.DEREF_ALWAYS,
-            new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ), ctrl ) );
+            new SearchOperationContext( ctx.getDirectoryService().getRegistries(), contextName,
+                AliasDerefMode.DEREF_ALWAYS, new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ), ctrl ) );
 
         try
         {
             while ( e.hasMore() )
             {
-            	ServerSearchResult sr = e.next();
-                ServerEntry attrs = sr.getServerEntry(); 
+                ServerSearchResult sr = e.next();
+                ServerEntry attrs = sr.getServerEntry();
 
                 // Skip entries without entryCSN attribute.
                 EntryAttribute entryCSNAttr = attrs.get( org.apache.directory.mitosis.common.Constants.ENTRY_CSN );
-                
+
                 if ( entryCSNAttr == null )
                 {
                     continue;
@@ -404,18 +401,18 @@
 
                 // Get entryCSN of the entry.  Skip if entryCSN value is invalid. 
                 CSN csn;
-                
+
                 try
                 {
                     Object val = entryCSNAttr.get();
-                    
+
                     if ( val instanceof byte[] )
                     {
-                        csn = new DefaultCSN( StringTools.utf8ToString( (byte[])val ) );
+                        csn = new DefaultCSN( StringTools.utf8ToString( ( byte[] ) val ) );
                     }
                     else
                     {
-                        csn = new DefaultCSN( (String)val );
+                        csn = new DefaultCSN( ( String ) val );
                     }
                 }
                 catch ( IllegalArgumentException ex )
@@ -426,9 +423,9 @@
 
                 // Convert the entry into AddEntryOperation log.
                 LdapDN dn = sr.getDn();
-                dn.normalize( ctx.getDirectoryService().getRegistries()
-                        .getAttributeTypeRegistry().getNormalizerMapping() );
-                Operation op = new AddEntryOperation( csn, dn, attrs );
+                dn.normalize( ctx.getDirectoryService().getRegistries().getAttributeTypeRegistry()
+                    .getNormalizerMapping() );
+                Operation op = new AddEntryOperation( csn, attrs );
 
                 // Send a LogEntry message for the entry.
                 writeTimeLimitedMessage( ctx, new LogEntryMessage( ctx.getNextSequence(), op ) );
@@ -451,7 +448,7 @@
             if ( yourCSN != null && ( myCSN == null || yourCSN.compareTo( myCSN ) < 0 ) )
             {
                 SessionLog.warn( ctx.getSession(), "Remote update vector (" + yourUV
-                        + ") is out-of-date.  Full replication is required." );
+                    + ") is out-of-date.  Full replication is required." );
                 ctx.getSession().close();
                 return;
             }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java Sat May 10 09:30:45 2008
@@ -198,7 +198,7 @@
         CSN csn = csnFactory.newInstance( REPLICA_ID );
         CompositeOperation op1 = new CompositeOperation( csn );
         LdapDN ouA =  new LdapDN( "ou=a" ).normalize( oids );
-        op1.add( new AddEntryOperation( csn, ouA, 
+        op1.add( new AddEntryOperation( csn, 
             new DefaultServerEntry( service.getRegistries(), ouA ) ) );
         
         op1.add( new AddAttributeOperation( csn, ouA, 
@@ -215,7 +215,7 @@
 
         csn = csnFactory.newInstance( OTHER_REPLICA_ID );
         CompositeOperation op2 = new CompositeOperation( csn );
-        op2.add( new AddEntryOperation( csn, ouA, 
+        op2.add( new AddEntryOperation( csn, 
             new DefaultServerEntry( service.getRegistries(), ouA ) ) );
         
         op2.add( new AddAttributeOperation( csn, ouA, 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/pom.xml Sat May 10 09:30:45 2008
@@ -30,7 +30,7 @@
 
   <groupId>org.apache.directory.server</groupId>
   <artifactId>apacheds-parent</artifactId>
-  <version>1.5.3-SNAPSHOT</version>
+  <version>1.5.4-SNAPSHOT</version>
   <name>ApacheDS</name>
   <packaging>pom</packaging>
 
@@ -47,31 +47,31 @@
       <dependency>
         <groupId>org.apache.directory.shared</groupId>
         <artifactId>shared-asn1-codec</artifactId>
-        <version>0.9.11-SNAPSHOT</version>
+        <version>0.9.12-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.shared</groupId>
         <artifactId>shared-ldap</artifactId>
-        <version>0.9.11-SNAPSHOT</version>
+        <version>0.9.12-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.shared</groupId>
         <artifactId>shared-ldap-constants</artifactId>
-        <version>0.9.11-SNAPSHOT</version>
+        <version>0.9.12-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.shared</groupId>
         <artifactId>shared-bouncycastle-reduced</artifactId>
-        <version>0.9.11-SNAPSHOT</version>
+        <version>0.9.12-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.daemon</groupId>
         <artifactId>daemon-bootstrappers</artifactId>
-        <version>1.1.4-SNAPSHOT</version>
+        <version>1.1.5-SNAPSHOT</version>
       </dependency>
 
       <dependency>
@@ -158,11 +158,11 @@
         <version>1.2.14</version>
       </dependency>
 
-      <dependency>
+      <!--dependency>
         <groupId>jdbm</groupId>
         <artifactId>jdbm</artifactId>
         <version>1.0</version>
-      </dependency>
+      </dependency-->
 
       <dependency>
         <groupId>org.apache.velocity</groupId>
@@ -332,6 +332,7 @@
   </dependencies>
 
   <modules>
+    <module>apacheds-jdbm</module>
     <module>bootstrap-extract</module>
     <module>bootstrap-partition</module>
     <module>bootstrap-plugin</module>
@@ -344,6 +345,7 @@
     <module>xdbm-search</module>
     <module>xdbm-tools</module>
     <module>core</module>
+    <!--module>core-jndi</module-->
     <module>core-constants</module>
     <module>core-shared</module>
     <module>core-plugin</module>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/protocol-changepw/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/protocol-changepw/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/protocol-changepw/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/protocol-changepw/pom.xml Sat May 10 09:30:45 2008
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>apacheds-parent</artifactId>
-    <version>1.5.3-SNAPSHOT</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
   <artifactId>apacheds-protocol-changepw</artifactId>
   <name>ApacheDS Protocol Change Password</name>
@@ -42,5 +42,24 @@
       <version>${pom.version}</version>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/protocol-dhcp/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/protocol-dhcp/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/protocol-dhcp/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/protocol-dhcp/pom.xml Sat May 10 09:30:45 2008
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>apacheds-parent</artifactId>
-    <version>1.5.3-SNAPSHOT</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
   <artifactId>apacheds-protocol-dhcp</artifactId>
   <name>ApacheDS Protocol Dhcp</name>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/protocol-dns/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/protocol-dns/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/protocol-dns/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/protocol-dns/pom.xml Sat May 10 09:30:45 2008
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>apacheds-parent</artifactId>
-    <version>1.5.3-SNAPSHOT</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
   <artifactId>apacheds-protocol-dns</artifactId>
   <name>ApacheDS Protocol Dns</name>
@@ -49,5 +49,24 @@
       <version>${pom.version}</version>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>