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 [8/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/protocol-kerberos/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/protocol-kerberos/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/protocol-kerberos/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/protocol-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-protocol-kerberos</artifactId>
   <name>ApacheDS Protocol Kerberos</name>
@@ -65,7 +65,21 @@
           </excludes>
         </configuration>
       </plugin>
+      <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-ldap/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/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-ldap</artifactId>
 
@@ -70,5 +70,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-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java Sat May 10 09:30:45 2008
@@ -25,14 +25,7 @@
 import java.security.KeyStore;
 import java.security.Provider;
 import java.security.Security;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 import javax.naming.Context;
 import javax.naming.NamingException;
@@ -41,35 +34,34 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.security.CoreKeyStoreSpi;
-import org.apache.directory.server.ldap.support.AbandonHandler;
-import org.apache.directory.server.ldap.support.AddHandler;
-import org.apache.directory.server.ldap.support.BindHandler;
-import org.apache.directory.server.ldap.support.CompareHandler;
-import org.apache.directory.server.ldap.support.DefaultAbandonHandler;
-import org.apache.directory.server.ldap.support.DefaultAddHandler;
-import org.apache.directory.server.ldap.support.DefaultBindHandler;
-import org.apache.directory.server.ldap.support.DefaultCompareHandler;
-import org.apache.directory.server.ldap.support.DefaultDeleteHandler;
-import org.apache.directory.server.ldap.support.DefaultExtendedHandler;
-import org.apache.directory.server.ldap.support.DefaultModifyDnHandler;
-import org.apache.directory.server.ldap.support.DefaultModifyHandler;
-import org.apache.directory.server.ldap.support.DefaultSearchHandler;
-import org.apache.directory.server.ldap.support.DefaultUnbindHandler;
-import org.apache.directory.server.ldap.support.DeleteHandler;
-import org.apache.directory.server.ldap.support.ExtendedHandler;
-import org.apache.directory.server.ldap.support.ModifyDnHandler;
-import org.apache.directory.server.ldap.support.ModifyHandler;
-import org.apache.directory.server.ldap.support.SearchHandler;
-import org.apache.directory.server.ldap.support.UnbindHandler;
-import org.apache.directory.server.ldap.support.ssl.LdapsInitializer;
+import org.apache.directory.server.ldap.handlers.AbandonHandler;
+import org.apache.directory.server.ldap.handlers.AddHandler;
+import org.apache.directory.server.ldap.handlers.BindHandler;
+import org.apache.directory.server.ldap.handlers.CompareHandler;
+import org.apache.directory.server.ldap.handlers.DefaultAbandonHandler;
+import org.apache.directory.server.ldap.handlers.DefaultAddHandler;
+import org.apache.directory.server.ldap.handlers.DefaultBindHandler;
+import org.apache.directory.server.ldap.handlers.DefaultCompareHandler;
+import org.apache.directory.server.ldap.handlers.DefaultDeleteHandler;
+import org.apache.directory.server.ldap.handlers.DefaultExtendedHandler;
+import org.apache.directory.server.ldap.handlers.DefaultModifyDnHandler;
+import org.apache.directory.server.ldap.handlers.DefaultModifyHandler;
+import org.apache.directory.server.ldap.handlers.DefaultSearchHandler;
+import org.apache.directory.server.ldap.handlers.DefaultUnbindHandler;
+import org.apache.directory.server.ldap.handlers.DeleteHandler;
+import org.apache.directory.server.ldap.handlers.ExtendedHandler;
+import org.apache.directory.server.ldap.handlers.ModifyDnHandler;
+import org.apache.directory.server.ldap.handlers.ModifyHandler;
+import org.apache.directory.server.ldap.handlers.SearchHandler;
+import org.apache.directory.server.ldap.handlers.UnbindHandler;
+import org.apache.directory.server.ldap.handlers.bind.*;
+import org.apache.directory.server.ldap.handlers.ssl.LdapsInitializer;
 import org.apache.directory.server.protocol.shared.DirectoryBackedService;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.asn1.codec.Asn1CodecDecoder;
 import org.apache.directory.shared.asn1.codec.Asn1CodecEncoder;
 import org.apache.directory.shared.ldap.constants.SaslQoP;
-import org.apache.directory.shared.ldap.constants.SupportedSASLMechanisms;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
-import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.AbandonRequest;
 import org.apache.directory.shared.ldap.message.AddRequest;
 import org.apache.directory.shared.ldap.message.BindRequest;
@@ -126,6 +118,7 @@
  */
 public class LdapServer extends DirectoryBackedService
 {
+    @SuppressWarnings( { "UnusedDeclaration" } )
     private static final long serialVersionUID = 3757127143811666817L;
 
     /** logger for this class */
@@ -169,10 +162,12 @@
     private boolean allowAnonymousAccess = true; // allow by default
 
     /** The extended operation handlers. */
-    private final Collection<ExtendedOperationHandler> extendedOperationHandlers = new ArrayList<ExtendedOperationHandler>();
+    private final Collection<ExtendedOperationHandler> extendedOperationHandlers =
+        new ArrayList<ExtendedOperationHandler>();
 
     /** The supported authentication mechanisms. */
-    private Set<String> supportedMechanisms;
+    private Map<String, MechanismHandler> saslMechanismHandlers =
+        new HashMap<String, MechanismHandler>();
 
     /** The name of this host, validated during SASL negotiation. */
     private String saslHost = "ldap.example.com";
@@ -221,12 +216,6 @@
         super.setServiceId( SERVICE_PID_DEFAULT );
         super.setServiceName( SERVICE_NAME_DEFAULT );
 
-        supportedMechanisms = new HashSet<String>();
-        supportedMechanisms.add( SupportedSASLMechanisms.SIMPLE );
-        supportedMechanisms.add( SupportedSASLMechanisms.CRAM_MD5 );
-        supportedMechanisms.add( SupportedSASLMechanisms.DIGEST_MD5 );
-        supportedMechanisms.add( SupportedSASLMechanisms.GSSAPI );
-
         saslQop = new HashSet<String>();
         saslQop.add( SaslQoP.QOP_AUTH );
         saslQop.add( SaslQoP.QOP_AUTH_INT );
@@ -244,6 +233,7 @@
         this.supportedControls.add( CascadeControl.CONTROL_OID );
     }
 
+
     /**
      * Install the LDAP request handlers.
      */
@@ -261,7 +251,10 @@
         
         if ( getBindHandler() == null )
         {
-            setBindHandler( new DefaultBindHandler( getDirectoryService(), registry ) );
+            DefaultBindHandler handler = new DefaultBindHandler();
+            handler.setSessionRegistry( registry );
+            handler.setSaslMechanismHandlers( saslMechanismHandlers );
+            setBindHandler( handler );
         }
         
         if ( getCompareHandler() == null )
@@ -407,17 +400,20 @@
 
 
     private void startLDAP0( int port, IoFilterChainBuilder chainBuilder )
-        throws LdapNamingException, LdapConfigurationException, NamingException
+        throws NamingException
     {
-        for ( ExtendedOperationHandler h : getExtendedOperationHandlers() )
+        PartitionNexus nexus = getDirectoryService().getPartitionNexus();
+
+        for ( ExtendedOperationHandler h : extendedOperationHandlers )
         {
-            addExtendedOperationHandler( h );
+            extendedHandler.addHandler( h );
             LOG.info( "Added Extended Request Handler: " + h.getOid() );
             h.setLdapProvider( this );
-            PartitionNexus nexus = getDirectoryService().getPartitionNexus();
             nexus.registerSupportedExtensions( h.getExtensionOids() );
         }
 
+        nexus.registerSupportedSaslMechanisms( saslMechanismHandlers.keySet() );
+
         try
         {
             SocketAcceptorConfig acceptorCfg = new SocketAcceptorConfig();
@@ -477,14 +473,21 @@
      * protocol provider to provide a specific LDAP extended operation.
      *
      * @param eoh an extended operation handler
+     * @throws NamingException on failure to add the handler
      */
-    public void addExtendedOperationHandler( ExtendedOperationHandler eoh )
+    public void addExtendedOperationHandler( ExtendedOperationHandler eoh ) throws NamingException
     {
-        if ( extendedHandler == null )
+        if ( started )
         {
-            setExtendedHandler( new DefaultExtendedHandler() );
+            extendedHandler.addHandler( eoh );
+            eoh.setLdapProvider( this );
+            PartitionNexus nexus = getDirectoryService().getPartitionNexus();
+            nexus.registerSupportedExtensions( eoh.getExtensionOids() );
+        }
+        else
+        {
+            extendedOperationHandlers.add( eoh );
         }
-        extendedHandler.addHandler( eoh );
     }
 
 
@@ -497,7 +500,27 @@
      */
     public void removeExtendedOperationHandler( String oid )
     {
-        extendedHandler.removeHandler( oid );
+        if ( started )
+        {
+            extendedHandler.removeHandler( oid );
+
+            // need to do something like this to make this work right
+            //            PartitionNexus nexus = getDirectoryService().getPartitionNexus();
+            //            nexus.unregisterSupportedExtensions( eoh.getExtensionOids() );
+        }
+        else
+        {
+            ExtendedOperationHandler handler = null;
+            for ( ExtendedOperationHandler h : extendedOperationHandlers )
+            {
+                if ( h.getOid().equals( oid ) )
+                {
+                    handler = h;
+                    break;
+                }
+            }
+            extendedOperationHandlers.remove( handler );
+        }
     }
 
 
@@ -511,7 +534,22 @@
      */
     public ExtendedOperationHandler getExtendedOperationHandler( String oid )
     {
-        return extendedHandler.getHandler( oid );
+        if ( started )
+        {
+            return extendedHandler.getHandler( oid );
+        }
+        else
+        {
+            for ( ExtendedOperationHandler h : extendedOperationHandlers )
+            {
+                if ( h.getOid().equals( oid ) )
+                {
+                    return h;
+                }
+            }
+        }
+
+        return null;
     }
 
 
@@ -763,27 +801,39 @@
     }
 
 
-    /**
-     * Returns the list of supported authentication mechanisms.
-     *
-     * @return The list of supported authentication mechanisms.
-     */
-    public Set<String> getSupportedMechanisms()
+    public void setSaslMechanismHandlers( Map<String, MechanismHandler> saslMechanismHandlers )
     {
-        return supportedMechanisms;
+        this.saslMechanismHandlers = saslMechanismHandlers;
     }
 
 
-    /**
-     * Sets the list of supported authentication mechanisms.
-     *
-     * @org.apache.xbean.Property propertyEditor="ListEditor" nestedType="java.lang.String"
-     *
-     * @param supportedMechanisms The list of supported authentication mechanisms.
-     */
-    public void setSupportedMechanisms( Set<String> supportedMechanisms )
+    public Map<String, MechanismHandler> getSaslMechanismHandlers()
+    {
+        return saslMechanismHandlers;
+    }
+
+
+    public MechanismHandler addSaslMechanismHandler( String mechanism, MechanismHandler handler )
+    {
+        return this.saslMechanismHandlers.put( mechanism, handler );
+    }
+
+
+    public MechanismHandler removeSaslMechanismHandler( String mechanism )
+    {
+        return this.saslMechanismHandlers.remove( mechanism );
+    }
+
+
+    public MechanismHandler getMechanismHandler( String mechanism )
+    {
+        return this.saslMechanismHandlers.get( mechanism );
+    }
+
+
+    public Set<String> getSupportedMechanisms()
     {
-        this.supportedMechanisms = supportedMechanisms;
+        return saslMechanismHandlers.keySet();
     }
 
 
@@ -1055,7 +1105,7 @@
             // 
             // The RFC specifies the payload should be empty, but we use
             // it to notify the TLS state changes.  This hack should be
-            // OK from the viewpoint of security because StartTLS
+            // OK from the viewpointd of security because StartTLS
             // handler should react to only SESSION_UNSECURED message
             // and degrade authentication level to 'anonymous' as specified
             // in the RFC, and this is no threat.

Modified: directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java Sat May 10 09:30:45 2008
@@ -64,8 +64,8 @@
     /**
      * Creates a singleton session state object for the system.
      *
+     * @param ldapServer the ldap server instance
      * @param env the properties associated with this SessionRegistry
-     * @param ldapServer the ldap configuration
      */
     public SessionRegistry( LdapServer ldapServer, Hashtable<String, Object> env )
     {
@@ -256,7 +256,7 @@
         if ( ctx == null && allowAnonymous )
         {
             // if configuration says disable anonymous binds we throw exception
-            if ( !ldapServer.isAllowAnonymousAccess() )
+            if ( ! ldapServer.isAllowAnonymousAccess() )
             {
                 throw new LdapNoPermissionException( "Anonymous binds have been disabled!" );
             }
@@ -300,7 +300,7 @@
 
             // if the user principal is anonymous and the configuration does not allow anonymous binds we
             // prevent the operation by blowing a NoPermissionsException
-            if ( isAnonymousUser && !ldapServer.isAllowAnonymousAccess() )
+            if ( isAnonymousUser && ! ldapServer.isAllowAnonymousAccess() )
             {
                 throw new LdapNoPermissionException( "Anonymous binds have been disabled!" );
             }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java Sat May 10 09:30:45 2008
@@ -46,7 +46,7 @@
 import javax.swing.event.ListSelectionListener;
 
 import org.apache.directory.server.ldap.SessionRegistry;
-import org.apache.directory.server.ldap.support.extended.GracefulShutdownHandler;
+import org.apache.directory.server.ldap.handlers.extended.GracefulShutdownHandler;
 import org.apache.directory.shared.ldap.message.extended.GracefulDisconnect;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
 import org.apache.mina.common.CloseFuture;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/protocol-ntp/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/protocol-ntp/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/protocol-ntp/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/protocol-ntp/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-ntp</artifactId>
   <name>ApacheDS Protocol Ntp</name>
@@ -66,5 +66,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/protocol-shared/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/protocol-shared/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/protocol-shared/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/protocol-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>
   <groupId>org.apache.directory.server</groupId>
   <artifactId>apacheds-protocol-shared</artifactId>
@@ -49,6 +49,22 @@
     </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-shared/src/main/java/org/apache/directory/server/protocol/shared/SocketAcceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/SocketAcceptor.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/SocketAcceptor.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/SocketAcceptor.java Sat May 10 09:30:45 2008
@@ -41,19 +41,16 @@
 
     public SocketAcceptor( Executor logicExecutor )
     {
-        super( Runtime.getRuntime().availableProcessors(), getIOExecutor());
+        super( Runtime.getRuntime().availableProcessors(), Executors.newCachedThreadPool());
+        
         if ( logicExecutor == null )
         {
             logicExecutor = Executors.newFixedThreadPool( DEFAULT_THREADS );
         }
+        
         getFilterChain().addLast( "executor", new ExecutorFilter( logicExecutor ) );
     }
 
-    private static Executor getIOExecutor()
-    {
-        return Executors.newCachedThreadPool();
-    }
-
     public void bind( SocketAddress address, IoHandler ioHandler, IoServiceConfig tcpConfig ) throws IOException
     {
         tcpConfig.setThreadModel( ThreadModel.MANUAL );
@@ -64,6 +61,4 @@
     {
         super.unbind(address);
     }
-
-
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/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-schema-bootstrap</artifactId>
   <name>ApacheDS Bootstrap Schemas</name>
@@ -56,8 +56,9 @@
     </dependency>
 
     <dependency>
-      <groupId>jdbm</groupId>
-      <artifactId>jdbm</artifactId>
+      <groupId>${pom.groupId}</groupId>
+      <version>${pom.version}</version>
+      <artifactId>apacheds-jdbm</artifactId>
     </dependency>
   </dependencies>
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java Sat May 10 09:30:45 2008
@@ -137,9 +137,9 @@
         HashMap<String,Schema> loaded = new HashMap<String,Schema>();
         HashMap<String,Schema> notLoaded = new HashMap<String,Schema>();
 
-        for ( int ii = 0; ii < schemas.length; ii++ )
+        for ( BootstrapSchema schema:schemas )
         {
-            notLoaded.put( schemas[ii].getSchemaName(), schemas[ii] );
+            notLoaded.put( schema.getSchemaName(), schema );
         }
 
         BootstrapSchema schema;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/schema-extras/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/schema-extras/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/schema-extras/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/schema-extras/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-schema-extras</artifactId>
   <name>ApacheDS Extra Schemas</name>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/schema-registries/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/schema-registries/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/schema-registries/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/schema-registries/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-schema-registries</artifactId>
   <name>ApacheDS Schema Registries</name>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-jndi/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-jndi/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-jndi/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-jndi/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-server-jndi</artifactId>
   <name>ApacheDS Server JNDI</name>
@@ -82,5 +82,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/server-replication/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-replication/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-replication/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-replication/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-server-replication</artifactId>
   <name>ApacheDS Server Replication Service</name>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-sar/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-sar/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-sar/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-sar/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.2-SNAPSHOT</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
   <artifactId>apacheds-server-sar</artifactId>
   <name>ApacheDS Server Sar (JBoss 3.x)</name>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-tools/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-tools/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-tools/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-tools/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-server-tools</artifactId>
   <name>ApacheDS Server Tools</name>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java Sat May 10 09:30:45 2008
@@ -243,7 +243,7 @@
         base.disableTransactions();
         CacheRecordManager recMan = new CacheRecordManager( base, new MRU( 1000 ) );
 
-        JdbmMasterTable master = new JdbmMasterTable( recMan );
+        JdbmMasterTable master = new JdbmMasterTable( recMan, bootstrapRegistries );
         AttributeType attributeType = bootstrapRegistries.getAttributeTypeRegistry().lookup( "apacheUpdn" );
         JdbmIndex idIndex = new JdbmIndex();
         idIndex.setAttributeId( attributeType.getName() );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java Sat May 10 09:30:45 2008
@@ -207,7 +207,7 @@
         base.disableTransactions();
         CacheRecordManager recMan = new CacheRecordManager( base, new MRU( 1000 ) );
 
-        JdbmMasterTable master = new JdbmMasterTable( recMan );
+        JdbmMasterTable master = new JdbmMasterTable( recMan, bootstrapRegistries );
         JdbmIndex index = new JdbmIndex();
         index.setAttributeId( attributeType.getName() );
         index.setWkDirPath( partitionDirectory );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-unit/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-unit/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-unit/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-unit/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-server-unit</artifactId>
   <name>ApacheDS Server Unit</name>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java Sat May 10 09:30:45 2008
@@ -28,13 +28,16 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
 import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.server.ldap.support.extended.StartTlsHandler;
-import org.apache.directory.server.ldap.support.extended.StoredProcedureExtendedOperationHandler;
+import org.apache.directory.server.ldap.handlers.extended.StartTlsHandler;
+import org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler;
+import org.apache.directory.server.ldap.handlers.bind.*;
+import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmMechanismHandler;
 import org.apache.directory.server.protocol.shared.SocketAcceptor;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
 import org.apache.mina.util.AvailablePortFinder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -49,11 +52,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 
 /**
@@ -248,31 +247,70 @@
         ldapServer.setDirectoryService( directoryService );
         ldapServer.setIpPort( port = AvailablePortFinder.getNextAvailable( 1024 ) );
 
+        setupSaslMechanisms( ldapServer );
+
         doDelete( directoryService.getWorkingDirectory() );
         configureDirectoryService();
         directoryService.startup();
 
         configureLdapServer();
+
+        // TODO shouldn't this be before calling configureLdapServer() ???
         ldapServer.addExtendedOperationHandler( new StartTlsHandler() );
         ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+
         ldapServer.start();
         setContexts( ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
     }
 
+
+    private void setupSaslMechanisms( LdapServer server )
+    {
+        Map<String, MechanismHandler> mechanismHandlerMap = new HashMap<String,MechanismHandler>();
+
+        mechanismHandlerMap.put( SupportedSaslMechanisms.SIMPLE, new SimpleMechanismHandler() );
+
+        CramMd5MechanismHandler cramMd5MechanismHandler = new CramMd5MechanismHandler();
+        cramMd5MechanismHandler.setDirectoryService( directoryService );
+        mechanismHandlerMap.put( SupportedSaslMechanisms.CRAM_MD5, cramMd5MechanismHandler );
+
+        DigestMd5MechanismHandler digestMd5MechanismHandler = new DigestMd5MechanismHandler();
+        digestMd5MechanismHandler.setDirectoryService( directoryService );
+        mechanismHandlerMap.put( SupportedSaslMechanisms.DIGEST_MD5, digestMd5MechanismHandler );
+
+        GssapiMechanismHandler gssapiMechanismHandler = new GssapiMechanismHandler();
+        gssapiMechanismHandler.setDirectoryService( directoryService );
+        mechanismHandlerMap.put( SupportedSaslMechanisms.GSSAPI, gssapiMechanismHandler );
+
+        NtlmMechanismHandler ntlmMechanismHandler = new NtlmMechanismHandler();
+        // TODO - set some sort of default NtlmProvider implementation here
+        // ntlmMechanismHandler.setNtlmProvider( provider );
+        // TODO - or set FQCN of some sort of default NtlmProvider implementation here
+        // ntlmMechanismHandler.setNtlmProviderFqcn( "com.foo.BarNtlmProvider" );
+        mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
+        mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
+
+        ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
+    }
+
+
     protected void configureDirectoryService() throws NamingException
     {
     }
 
+
     protected void configureLdapServer()
     {
     }
 
+
     protected void setAllowAnonymousAccess( boolean anonymousAccess )
     {
         directoryService.setAllowAnonymousAccess( anonymousAccess );
         ldapServer.setAllowAnonymousAccess( anonymousAccess );
     }
 
+    
     /**
      * Deletes the Eve working directory.
      * @param wkdir the directory to delete

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java Sat May 10 09:30:45 2008
@@ -118,7 +118,7 @@
 
     /**
      * Just a little test to check wether opening the connection succeeds.
-     */
+     *
     @Test public void testSetUpTearDown()
     {
         assertNotNull( ctx );
@@ -129,7 +129,7 @@
      * Modify Rdn of an entry, delete its old rdn value.
      * 
      * @throws NamingException
-     */
+     *
     @Test public void testModifyRdnAndDeleteOld() throws NamingException
     {
         // Create a person, cn value is rdn
@@ -176,7 +176,7 @@
      * The JNDI property is set with 'False'
      * 
      * @throws NamingException
-     */
+     *
     @Test public void testModifyRdnAndDontDeleteOldFalse() throws NamingException
     {
         // Create a person, cn value is rdn
@@ -221,7 +221,7 @@
      * Modify Rdn of an entry, keep its old rdn value.
      * 
      * @throws NamingException
-     */
+     *
     @Test public void testModifyRdnAndKeepOld() throws NamingException
     {
         // Create a person, cn value is rdn
@@ -268,7 +268,7 @@
      * cn has another value as well.
      * 
      * @throws NamingException
-     */
+     *
     @Test public void testModifyRdnAndDeleteOldVariant() throws NamingException
     {
         // Create a person, cn value is rdn
@@ -322,7 +322,7 @@
      * Modify DN of an entry, changing RDN from cn to sn.
      * 
      * @throws NamingException
-     */
+     *
     @Test public void testModifyRdnDifferentAttribute() throws NamingException
     {
 
@@ -442,7 +442,7 @@
      * Ensure that the attribute itself contains the unencoded value.
      *
      * @throws Exception
-     */
+     *
     /*
     @Test public void testModifyRdnWithEncodedNewRdn() throws Exception
     {
@@ -484,6 +484,5 @@
         ctx.unbind( newRdn );
     }
     */
-
 }
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java Sat May 10 09:30:45 2008
@@ -20,16 +20,30 @@
 package org.apache.directory.server;
 
 
+import org.apache.commons.lang.ArrayUtils;
+import org.apache.commons.net.SocketClient;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
+import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmAuthenticationResult;
+import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmMechanismHandler;
+import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmProvider;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.BindRequestImpl;
+import org.apache.directory.shared.ldap.message.BindResponse;
+import org.apache.directory.shared.ldap.message.MessageDecoder;
+import org.apache.directory.shared.ldap.message.MessageEncoder;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.naming.Context;
 import javax.naming.NamingEnumeration;
@@ -38,6 +52,7 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
+
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Set;
@@ -52,7 +67,9 @@
  */
 public class SaslBindITest extends AbstractServerTest
 {
+    private static final Logger LOG = LoggerFactory.getLogger( SaslBindITest.class );
     private DirContext ctx;
+    private BogusNtlmProvider provider;
 
 
     /**
@@ -61,6 +78,7 @@
      */
     public void setUp() throws Exception
     {
+        provider = new BogusNtlmProvider();
         super.setUp();
         setAllowAnonymousAccess( false );
 
@@ -84,7 +102,6 @@
     @Override
     protected void configureDirectoryService() throws NamingException
     {
-
         Set<Partition> partitions = new HashSet<Partition>();
         JdbmPartition partition = new JdbmPartition();
         partition.setId( "example" );
@@ -113,8 +130,17 @@
     protected void configureLdapServer()
     {
         ldapServer.setSaslHost( "localhost" );
+        
+        NtlmMechanismHandler ntlmMechanismHandler = new NtlmMechanismHandler();
+        ntlmMechanismHandler.setNtlmProvider( provider  );
+        
+        ldapServer.removeSaslMechanismHandler( SupportedSaslMechanisms.NTLM );
+        ldapServer.addSaslMechanismHandler( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
+        ldapServer.removeSaslMechanismHandler( SupportedSaslMechanisms.GSS_SPNEGO );
+        ldapServer.addSaslMechanismHandler( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
     }
 
+    
     /**
      * Tear down.
      */
@@ -175,19 +201,14 @@
                 { "supportedSASLMechanisms" } );
 
             NamingEnumeration<? extends Attribute> answer = attrs.getAll();
-
-            if ( answer.hasMore() )
-            {
-                Attribute result = answer.next();
-                assertTrue( result.size() == 3 );
-                assertTrue( result.contains( "GSSAPI" ) );
-                assertTrue( result.contains( "DIGEST-MD5" ) );
-                assertTrue( result.contains( "CRAM-MD5" ) );
-            }
-            else
-            {
-                fail( "Should have returned 3 SASL mechanisms." );
-            }
+            Attribute result = answer.next();
+            assertTrue( result.size() == 6 );
+            assertTrue( result.contains( SupportedSaslMechanisms.GSSAPI ) );
+            assertTrue( result.contains( SupportedSaslMechanisms.DIGEST_MD5 ) );
+            assertTrue( result.contains( SupportedSaslMechanisms.CRAM_MD5 ) );
+            assertTrue( result.contains( SupportedSaslMechanisms.NTLM ) );
+            assertTrue( result.contains( SupportedSaslMechanisms.SIMPLE ) );
+            assertTrue( result.contains( SupportedSaslMechanisms.GSS_SPNEGO ) );
         }
         catch ( NamingException e )
         {
@@ -499,4 +520,175 @@
             assertTrue( e.getMessage().contains( "Invalid response" ) );
         }
     }
+
+
+    /**
+     * Tests that the plumbing for NTLM bind works.
+     */
+    public void testNtlmBind() throws Exception
+    {
+        NtlmSaslBindClient client = new NtlmSaslBindClient( SupportedSaslMechanisms.NTLM );
+        BindResponse type2response = client.bindType1( "type1_test".getBytes() );
+        assertEquals( 1, type2response.getMessageId() );
+        assertEquals( ResultCodeEnum.SASL_BIND_IN_PROGRESS, type2response.getLdapResult().getResultCode() );
+        assertTrue( ArrayUtils.isEquals( "type1_test".getBytes(), provider.getType1Response() ) );
+        assertTrue( ArrayUtils.isEquals( "challenge".getBytes(), type2response.getServerSaslCreds() ) );
+        
+        BindResponse finalResponse = client.bindType3( "type3_test".getBytes() );
+        assertEquals( 2, finalResponse.getMessageId() );
+        assertEquals( ResultCodeEnum.SUCCESS, finalResponse.getLdapResult().getResultCode() );
+        assertTrue( ArrayUtils.isEquals( "type3_test".getBytes(), provider.getType3Response() ) );
+        assertTrue( ArrayUtils.isEquals( "results".getBytes(), finalResponse.getServerSaslCreds() ) );
+    }
+
+
+    /**
+     * Tests that the plumbing for NTLM bind works.
+     */
+    public void testGssSpnegoBind() throws Exception
+    {
+        NtlmSaslBindClient client = new NtlmSaslBindClient( SupportedSaslMechanisms.GSS_SPNEGO );
+        BindResponse type2response = client.bindType1( "type1_test".getBytes() );
+        assertEquals( 1, type2response.getMessageId() );
+        assertEquals( ResultCodeEnum.SASL_BIND_IN_PROGRESS, type2response.getLdapResult().getResultCode() );
+        assertTrue( ArrayUtils.isEquals( "type1_test".getBytes(), provider.getType1Response() ) );
+        assertTrue( ArrayUtils.isEquals( "challenge".getBytes(), type2response.getServerSaslCreds() ) );
+        
+        BindResponse finalResponse = client.bindType3( "type3_test".getBytes() );
+        assertEquals( 2, finalResponse.getMessageId() );
+        assertEquals( ResultCodeEnum.SUCCESS, finalResponse.getLdapResult().getResultCode() );
+        assertTrue( ArrayUtils.isEquals( "type3_test".getBytes(), provider.getType3Response() ) );
+        assertTrue( ArrayUtils.isEquals( "results".getBytes(), finalResponse.getServerSaslCreds() ) );
+    }
+
+
+    class BogusNtlmProvider implements NtlmProvider
+    {
+        private byte[] type1response;
+        private byte[] type3response;
+        
+        
+        public NtlmAuthenticationResult authenticate( byte[] type3response ) throws Exception
+        {
+            this.type3response = type3response;
+            return new NtlmAuthenticationResult( "results".getBytes(), true );
+        }
+
+
+        public byte[] generateChallenge( byte[] type1reponse ) throws Exception
+        {
+            this.type1response = type1reponse;
+            return "challenge".getBytes();
+        }
+        
+        
+        public byte[] getType1Response()
+        {
+            return type1response;
+        }
+        
+        
+        public byte[] getType3Response()
+        {
+            return type3response;
+        }
+    }
+
+
+    class NtlmSaslBindClient extends SocketClient
+    {
+        private final String mechanism;
+        
+        
+        NtlmSaslBindClient( String mechanism ) throws Exception
+        {
+            this.mechanism = mechanism;
+            setDefaultPort( port );
+            connect( "localhost", port );
+            setTcpNoDelay( false );
+            
+            LOG.debug( "isConnected() = {}", _isConnected_ );
+            LOG.debug( "LocalPort     = {}", getLocalPort() );
+            LOG.debug( "LocalAddress  = {}", getLocalAddress() );
+            LOG.debug( "RemotePort    = {}", getRemotePort() );
+            LOG.debug( "RemoteAddress = {}", getRemoteAddress() );
+        }
+
+        
+        BindResponse bindType1( byte[] type1response ) throws Exception
+        {
+            if ( ! isConnected() )
+            {
+                throw new IllegalStateException( "Client is not connected." );
+            }
+            
+            // Setup the bind request
+            BindRequestImpl request = new BindRequestImpl( 1 ) ;
+            request.setName( new LdapDN( "uid=admin,ou=system" ) ) ;
+            request.setSimple( false ) ;
+            request.setCredentials( type1response ) ;
+            request.setSaslMechanism( mechanism );
+            request.setVersion3( true ) ;
+            
+            // Setup the ASN1 Enoder and Decoder
+            MessageEncoder encoder = new MessageEncoder();
+            MessageDecoder decoder = new MessageDecoder( new BinaryAttributeDetector() {
+                public boolean isBinary( String attributeId )
+                {
+                    return false;
+                }
+            } );
+     
+            // Send encoded request to server
+            encoder.encodeBlocking( null, _output_, request );
+            _output_.flush();
+            
+            while ( _input_.available() <= 0 )
+            {
+                Thread.sleep( 100 );
+            }
+            
+            // Retrieve the response back from server to my last request.
+            return ( BindResponse ) decoder.decode( null, _input_ );
+        }
+        
+        
+        BindResponse bindType3( byte[] type3response ) throws Exception
+        {
+            if ( ! isConnected() )
+            {
+                throw new IllegalStateException( "Client is not connected." );
+            }
+            
+            // Setup the bind request
+            BindRequestImpl request = new BindRequestImpl( 2 ) ;
+            request.setName( new LdapDN( "uid=admin,ou=system" ) ) ;
+            request.setSimple( false ) ;
+            request.setCredentials( type3response ) ;
+            request.setSaslMechanism( mechanism );
+            request.setVersion3( true ) ;
+            
+            // Setup the ASN1 Enoder and Decoder
+            MessageEncoder encoder = new MessageEncoder();
+            MessageDecoder decoder = new MessageDecoder( new BinaryAttributeDetector() {
+                public boolean isBinary( String attributeId )
+                {
+                    return false;
+                }
+            } );
+     
+            // Send encoded request to server
+            encoder.encodeBlocking( null, _output_, request );
+            
+            _output_.flush();
+            
+            while ( _input_.available() <= 0 )
+            {
+                Thread.sleep( 100 );
+            }
+            
+            // Retrieve the response back from server to my last request.
+            return ( BindResponse ) decoder.decode( null, _input_ );
+        }
+    }
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/StoredProcedureExecutionITest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/StoredProcedureExecutionITest.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/StoredProcedureExecutionITest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/StoredProcedureExecutionITest.java Sat May 10 09:30:45 2008
@@ -21,7 +21,7 @@
 
 
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
-import org.apache.directory.server.ldap.support.extended.StoredProcedureExtendedOperationHandler;
+import org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-xml/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-xml/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-xml/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-xml/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-server-xml</artifactId>
   <name>ApacheDS Server XML File</name>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-xml/src/main/resources/server.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-xml/src/main/resources/server.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-xml/src/main/resources/server.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-xml/src/main/resources/server.xml Sat May 10 09:30:45 2008
@@ -142,6 +142,7 @@
     <socketAcceptor>#socketAcceptor</socketAcceptor>
   </ldapServer>
 
+
   <ldapServer id="ldapServer"
               ipPort="10389"
               allowAnonymousAccess="false"
@@ -153,13 +154,28 @@
 
     <directoryService>#directoryService</directoryService>
     <socketAcceptor>#socketAcceptor</socketAcceptor>
+
     <!-- The list of supported authentication mechanisms.                   -->
-    <supportedMechanisms>
-      <s:value>SIMPLE</s:value>
-      <s:value>CRAM-MD5</s:value>
-      <s:value>DIGEST-MD5</s:value>
-      <!--<s:value>GSSAPI</s:value>-->
-    </supportedMechanisms>
+    <saslMechanismHandlers>
+      <s:entry key="SIMPLE">
+        <simpleMechanismHandler/>
+      </s:entry>
+      <s:entry key="CRAM-MD5">
+        <cramMd5MechanismHandler directoryService="#directoryService"/>
+      </s:entry>
+      <s:entry key="DIGEST-MD5">
+        <digestMd5MechanismHandler directoryService="#directoryService" />
+      </s:entry>
+      <s:entry key="GSSAPI">
+        <gssapiMechanismHandler directoryService="#directoryService" />
+      </s:entry>
+      <s:entry key="NTLM">
+        <ntlmMechanismHandler ntlmProviderFqcn="com.foo.Bar" />
+      </s:entry>
+      <s:entry key="GSS-SPNEGO">
+        <ntlmMechanismHandler ntlmProviderFqcn="com.foo.Bar" />
+      </s:entry>
+    </saslMechanismHandlers>
 
     <!-- The desired quality-of-protection, used by DIGEST-MD5 and GSSAPI.  -->
     <saslQop>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/utils/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/utils/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/utils/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/utils/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-utils</artifactId>
   <name>ApacheDS Utils</name>
@@ -46,6 +46,12 @@
       <artifactId>apacheds-core-shared</artifactId>
       <version>${pom.version}</version>
     </dependency>
+
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>apacheds-core-entry</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
   </dependencies>
 </project>
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java Sat May 10 09:30:45 2008
@@ -23,14 +23,15 @@
 import java.util.Comparator; 
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
+import org.apache.directory.server.core.entry.DefaultServerAttribute;
+import org.apache.directory.server.core.entry.DefaultServerEntry;
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.schema.bootstrap.Schema;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.DITContentRule;
 import org.apache.directory.shared.ldap.schema.DITStructureRule;
@@ -54,49 +55,50 @@
  */
 public class AttributesFactory
 {
-    public Attributes getAttributes( SchemaObject obj, Schema schema ) throws NamingException
+    public ServerEntry getAttributes( SchemaObject obj, Schema schema, Registries registries ) throws NamingException
     {
         if ( obj instanceof Syntax )
         {
-            return getAttributes( ( Syntax ) obj, schema );
+            return getAttributes( ( Syntax ) obj, schema, registries );
         }
         else if ( obj instanceof MatchingRule )
         {
-            return getAttributes( ( MatchingRule ) obj, schema );
+            return getAttributes( ( MatchingRule ) obj, schema, registries );
         }
         else if ( obj instanceof AttributeType )
         {
-            return getAttributes( ( AttributeType ) obj, schema );
+            return getAttributes( ( AttributeType ) obj, schema, registries );
         }
         else if ( obj instanceof ObjectClass )
         {
-            return getAttributes( ( ObjectClass ) obj, schema );
+            return getAttributes( ( ObjectClass ) obj, schema, registries );
         }
         else if ( obj instanceof MatchingRuleUse )
         {
-            return getAttributes( ( MatchingRuleUse ) obj, schema );
+            return getAttributes( ( MatchingRuleUse ) obj, schema, registries );
         }
         else if ( obj instanceof DITStructureRule )
         {
-            return getAttributes( ( DITStructureRule ) obj, schema );
+            return getAttributes( ( DITStructureRule ) obj, schema, registries );
         }
         else if ( obj instanceof DITContentRule )
         {
-            return getAttributes( ( DITContentRule ) obj, schema );
+            return getAttributes( ( DITContentRule ) obj, schema, registries );
         }
         else if ( obj instanceof NameForm )
         {
-            return getAttributes( ( NameForm ) obj, schema );
+            return getAttributes( ( NameForm ) obj, schema, registries );
         }
         
         throw new IllegalArgumentException( "Unknown SchemaObject type: " + obj.getClass() );
     }
     
     
-    public Attributes getAttributes( Schema schema )
+    public ServerEntry getAttributes( Schema schema, Registries registries ) throws NamingException
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_SCHEMA_OC );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_SCHEMA_OC );
         entry.put( SchemaConstants.CN_AT, schema.getSchemaName() );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
@@ -107,13 +109,16 @@
         }
         
         String[] dependencies = schema.getDependencies();
+        
         if ( dependencies != null && dependencies.length > 0 )
         {
-            Attribute attr = new AttributeImpl( MetaSchemaConstants.M_DEPENDENCIES_AT );
-            for ( int ii = 0; ii < dependencies.length; ii++ )
+            EntryAttribute attr = new DefaultServerAttribute( registries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_DEPENDENCIES_AT ) );
+            
+            for ( String dependency:dependencies )
             {
-                attr.add( dependencies[ii] );
+                attr.add( dependency );
             }
+            
             entry.put( attr );
         }
         
@@ -121,34 +126,39 @@
     }
     
     
-    public Attributes getAttributes( SyntaxChecker syntaxChecker, Schema schema )
+    public ServerEntry getAttributes( SyntaxChecker syntaxChecker, Schema schema, Registries registries )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_SYNTAX_CHECKER_OC );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_SYNTAX_CHECKER_OC );
         entry.put( MetaSchemaConstants.M_OID_AT, syntaxChecker.getSyntaxOid() );
         entry.put( MetaSchemaConstants.M_FQCN_AT, syntaxChecker.getClass().getName() );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
+        
         return entry;
     }
 
     
-    public Attributes getAttributes( Syntax syntax, Schema schema )
+    public ServerEntry getAttributes( Syntax syntax, Schema schema, Registries registries ) throws NamingException
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_SYNTAX_OC );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_SYNTAX_OC );
         entry.put( MetaSchemaConstants.X_HUMAN_READABLE_AT, getBoolean( syntax.isHumanReadable() ) );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
-        injectCommon( syntax, entry );
+        injectCommon( syntax, entry, registries );
+        
         return entry;
     }
 
     
-    public Attributes getAttributes( String oid, Normalizer normalizer, Schema schema )
+    public ServerEntry getAttributes( String oid, Normalizer normalizer, Schema schema, Registries registries )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_NORMALIZER_OC );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_NORMALIZER_OC );
         entry.put( MetaSchemaConstants.M_OID_AT, oid );
         entry.put( MetaSchemaConstants.M_FQCN_AT, normalizer.getClass().getName() );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
@@ -157,10 +167,11 @@
     }
 
     
-    public Attributes getAttributes( String oid, Comparator comparator, Schema schema )
+    public ServerEntry getAttributes( String oid, Comparator comparator, Schema schema, Registries registries )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_COMPARATOR_OC );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_COMPARATOR_OC );
         entry.put( MetaSchemaConstants.M_OID_AT, oid );
         entry.put( MetaSchemaConstants.M_FQCN_AT, comparator.getClass().getName() );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
@@ -175,52 +186,57 @@
      * @return Attributes
      * @throws NamingException
      */
-    public Attributes getAttributes( MatchingRule matchingRule, Schema schema ) throws NamingException
+    public ServerEntry getAttributes( MatchingRule matchingRule, Schema schema, Registries registries ) throws NamingException
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_MATCHING_RULE_OC );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_MATCHING_RULE_OC );
         entry.put( MetaSchemaConstants.M_SYNTAX_AT, matchingRule.getSyntax().getOid() );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
-        injectCommon( matchingRule, entry );
+        injectCommon( matchingRule, entry, registries );
         return entry;
     }
 
     
-    public Attributes getAttributes( MatchingRuleUse matchingRuleUse, Schema schema )
+    public ServerEntry getAttributes( MatchingRuleUse matchingRuleUse, Schema schema, Registries registries )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "" );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, "" );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         return entry;
     }
 
     
-    public Attributes getAttributes( DITStructureRule dITStructureRule, Schema schema )
+    public ServerEntry getAttributes( DITStructureRule dITStructureRule, Schema schema, Registries registries )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "" );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, "" );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         return entry;
     }
 
     
-    public Attributes getAttributes( DITContentRule dITContentRule, Schema schema )
+    public ServerEntry getAttributes( DITContentRule dITContentRule, Schema schema, Registries registries )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "" );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, "" );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         return entry;
     }
 
     
-    public Attributes getAttributes( NameForm nameForm, Schema schema )
+    public ServerEntry getAttributes( NameForm nameForm, Schema schema, Registries registries )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "" );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, "" );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         return entry;
@@ -245,10 +261,11 @@
      * @return Attributes
      * @throws NamingException
      */
-    public Attributes getAttributes( AttributeType attributeType, Schema schema ) throws NamingException
+    public ServerEntry getAttributes( AttributeType attributeType, Schema schema, Registries registries ) throws NamingException
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_ATTRIBUTE_TYPE_OC );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_ATTRIBUTE_TYPE_OC );
         entry.put( MetaSchemaConstants.M_SYNTAX_AT, attributeType.getSyntax().getOid() );
         entry.put( MetaSchemaConstants.M_COLLECTIVE_AT, getBoolean( attributeType.isCollective() ) );
         entry.put( MetaSchemaConstants.M_NO_USER_MODIFICATION_AT, getBoolean( ! attributeType.isCanUserModify() ) );
@@ -257,17 +274,20 @@
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
 
-        injectCommon( attributeType, entry );
+        injectCommon( attributeType, entry, registries );
         
         AttributeType superior = attributeType.getSuperior();
+        
         if ( superior != null )
         {
             // use name if we can for clarity
             String sup = superior.getName();
+            
             if ( sup == null )
             {
                 sup = superior.getOid();
             }
+            
             entry.put( MetaSchemaConstants.M_SUP_ATTRIBUTE_TYPE_AT, sup );
         }
         
@@ -330,49 +350,56 @@
      * @return the attributes of the metaSchema entry representing the objectClass
      * @throws NamingException if there are any problems
      */
-    public Attributes getAttributes( ObjectClass objectClass, Schema schema ) throws NamingException
+    public ServerEntry getAttributes( ObjectClass objectClass, Schema schema, Registries registries ) throws NamingException
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_OBJECT_CLASS_OC );
+        ServerEntry entry = new DefaultServerEntry( registries );
+
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_OBJECT_CLASS_OC );
         entry.put( MetaSchemaConstants.M_TYPE_OBJECT_CLASS_AT, objectClass.getType().toString() );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         
-        injectCommon( objectClass, entry );
+        injectCommon( objectClass, entry, registries );
 
         // handle the superior objectClasses 
         if ( objectClass.getSuperClasses() != null && objectClass.getSuperClasses().length != 0 )
         {
-            Attribute attr = new AttributeImpl( MetaSchemaConstants.M_SUP_OBJECT_CLASS_AT );
-            ObjectClass[] superclasses = objectClass.getSuperClasses();
-            for ( int ii = 0; ii < superclasses.length; ii++ )
+            EntryAttribute attr = new DefaultServerAttribute( registries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_SUP_OBJECT_CLASS_AT ) );
+            ObjectClass[] superClasses = objectClass.getSuperClasses();
+            
+            for ( ObjectClass superClass:superClasses )
             {
-                attr.add( getNameOrNumericoid( superclasses[ii] ) ); 
+                attr.add( getNameOrNumericoid( superClass ) ); 
             }
+            
             entry.put( attr );
         }
 
         // add the must list
         if ( objectClass.getMustList() != null && objectClass.getMustList().length != 0 )
         {
-            Attribute attr = new AttributeImpl( MetaSchemaConstants.M_MUST_AT );
+            EntryAttribute attr = new DefaultServerAttribute( registries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_MUST_AT ) );
             AttributeType[] mustList = objectClass.getMustList();
-            for ( int ii = 0; ii < mustList.length; ii++ )
+
+            for ( AttributeType attributeType:mustList )
             {
-                attr.add( getNameOrNumericoid( mustList[ii] ) );
+                attr.add( getNameOrNumericoid( attributeType ) );
             }
+            
             entry.put( attr );
         }
         
         // add the may list
         if ( objectClass.getMayList() != null && objectClass.getMayList().length != 0 )
         {
-            Attribute attr = new AttributeImpl( MetaSchemaConstants.M_MAY_AT );
+            EntryAttribute attr = new DefaultServerAttribute( registries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_MAY_AT ) );
             AttributeType[] mayList = objectClass.getMayList();
-            for ( int ii = 0; ii < mayList.length; ii++ )
+
+            for ( AttributeType attributeType:mayList )
             {
-                attr.add( getNameOrNumericoid( mayList[ii] ) );
+                attr.add( getNameOrNumericoid( attributeType ) );
             }
+            
             entry.put( attr );
         }
         
@@ -382,7 +409,7 @@
     
     private final String getNameOrNumericoid( SchemaObject object )
     {
-        // first try to use userfriendly name if we can
+        // first try to use user friendly name if we can
         if ( object.getName() != null )
         {
             return object.getName();
@@ -392,9 +419,9 @@
     }
     
     
-    private final void injectCommon( SchemaObject object, Attributes entry )
+    private final void injectCommon( SchemaObject object, ServerEntry entry, Registries registries ) throws NamingException
     {
-        injectNames( object.getNames(), entry );
+        injectNames( object.getNames(), entry, registries );
         entry.put( MetaSchemaConstants.M_OBSOLETE_AT, getBoolean( object.isObsolete() ) );
         entry.put( MetaSchemaConstants.M_OID_AT, object.getOid() );
         
@@ -405,18 +432,20 @@
     }
     
     
-    private final void injectNames( String[] names, Attributes entry )
+    private final void injectNames( String[] names, ServerEntry entry, Registries registries ) throws NamingException
     {
         if ( names == null || names.length == 0 )
         {
             return;
         }
         
-        Attribute attr = new AttributeImpl( MetaSchemaConstants.M_NAME_AT );
-        for ( int ii = 0; ii < names.length; ii++ )
+        EntryAttribute attr = new DefaultServerAttribute( registries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_NAME_AT ) );
+
+        for ( String name:names )
         {
-            attr.add( names[ii] );
+            attr.add( name );
         }
+        
         entry.put( attr );
     }
 

Propchange: directory/sandbox/akarasulu/bigbang/apacheds/xbean-spring/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat May 10 09:30:45 2008
@@ -1,4 +1,5 @@
 target
+*.iml
 *.ipr
 *.iws
 .classpath

Modified: directory/sandbox/akarasulu/bigbang/apacheds/xbean-spring/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/xbean-spring/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/xbean-spring/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/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.3-SNAPSHOT</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.directory.server</groupId>
@@ -104,13 +104,7 @@
       <classifier>sources</classifier>
       <scope>provided</scope>
     </dependency>
-    <dependency>
-      <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-jdbm-store</artifactId>
-      <version>${pom.version}</version>
-      <classifier>sources</classifier>
-      <scope>provided</scope>
-    </dependency>
+
     <!-- replication interceptor xbean config metadata -->
     <dependency>
       <groupId>org.apache.directory.server</groupId>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/pom.xml Sat May 10 09:30:45 2008
@@ -21,7 +21,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-xdbm-search</artifactId>
   <name>ApacheDS Generalized (X) DBM Search Engine</name>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/pom.xml Sat May 10 09:30:45 2008
@@ -21,7 +21,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-xdbm-tools</artifactId>
   <name>ApacheDS Generalized (X) DBM Tools</name>

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

Modified: directory/sandbox/akarasulu/bigbang/installers/apacheds/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/installers/apacheds/pom.xml?rev=655126&r1=655125&r2=655126&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/installers/apacheds/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/installers/apacheds/pom.xml Sat May 10 09:30:45 2008
@@ -3,7 +3,7 @@
   <parent>
     <groupId>org.apache.directory.installers</groupId>
     <artifactId>installers-parent</artifactId>
-    <version>1.5.3-SNAPSHOT</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
   <artifactId>apacheds-installers</artifactId>
   <name>ApacheDS Installers</name>
@@ -15,7 +15,7 @@
 
   <properties>
     <studio-version>1.1.0</studio-version>
-    <server-version>1.5.3-SNAPSHOT</server-version>
+    <server-version>1.5.4-SNAPSHOT</server-version>
     <suite-version>1.1.0</suite-version>
   </properties>
 
@@ -66,7 +66,7 @@
           <plugin>
             <groupId>org.apache.directory.daemon</groupId>
             <artifactId>daemon-plugin</artifactId>
-            <version>1.1.4-SNAPSHOT</version>
+            <version>1.1.5-SNAPSHOT</version>
             <configuration>
               <application>
                 <name>suite</name>
@@ -234,7 +234,7 @@
           <plugin>
             <groupId>org.apache.directory.daemon</groupId>
             <artifactId>daemon-plugin</artifactId>
-            <version>1.1.4-SNAPSHOT</version>
+            <version>1.1.5-SNAPSHOT</version>
             <configuration>
               <application>
                 <name>studio</name>
@@ -364,7 +364,7 @@
           <plugin>
             <groupId>org.apache.directory.daemon</groupId>
             <artifactId>daemon-plugin</artifactId>
-            <version>1.1.4-SNAPSHOT</version>
+            <version>1.1.5-SNAPSHOT</version>
             <configuration>
               <excludes>
 
@@ -396,7 +396,7 @@
               <application>
                 <name>apacheds</name>
                 <icon>src/main/resources/feather.ico</icon>
-                <version>1.5.3-SNAPSHOT</version>
+                <version>1.5.4-SNAPSHOT</version>
                 <copyrightYear>2007</copyrightYear>
                 <minimumJavaVersion>1.5</minimumJavaVersion>
                 <url>http://directory.apache.org</url>
@@ -706,7 +706,7 @@
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-server-xml</artifactId>
-                  <version>1.5.3-SNAPSHOT</version>
+                  <version>1.5.4-SNAPSHOT</version>
                 </artifactItem>
               </artifactItems>
               <outputDirectory>${basedir}/src/main/installers</outputDirectory>