directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1021931 - in /directory/apacheds/trunk: core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
Date Tue, 12 Oct 2010 21:26:07 GMT
Author: kayyagari
Date: Tue Oct 12 21:26:07 2010
New Revision: 1021931

URL: http://svn.apache.org/viewvc?rev=1021931&view=rev
Log:
o avoid redundant initialization of handlers, extended handlers and SASL mechanisms
o check for the existence of a OC before adding it (to avoid warn messages by the DefaultEntryAttribute
class)
  (see DIRSERVER-1512)

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java?rev=1021931&r1=1021930&r2=1021931&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java
Tue Oct 12 21:26:07 2010
@@ -216,9 +216,13 @@ public class TlsKeyGenerator
         {
             entry.put( SchemaConstants.OBJECT_CLASS_AT, TLS_KEY_INFO_OC, SchemaConstants.INET_ORG_PERSON_OC
);
         }
-        else
+        else if ( !objectClass.contains( SchemaConstants.INET_ORG_PERSON_OC ) )
         {
-            objectClass.add( TLS_KEY_INFO_OC, SchemaConstants.INET_ORG_PERSON_OC );
+            objectClass.add( SchemaConstants.INET_ORG_PERSON_OC );
+        }
+        else if ( !objectClass.contains( TLS_KEY_INFO_OC ) )
+        {
+            objectClass.add( TLS_KEY_INFO_OC );
         }
         
         KeyPairGenerator generator = null;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=1021931&r1=1021930&r2=1021931&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
Tue Oct 12 21:26:07 2010
@@ -445,15 +445,27 @@ public class LdapServer extends Director
             ( ( DefaultIoFilterChainBuilder ) chain ).addLast( "executor", new ExecutorFilter(
                 new UnorderedThreadPoolExecutor( transport.getNbThreads() ), IoEventType.MESSAGE_RECEIVED
) );
 
-            /*
-             * The server is now initialized, we can
-             * install the default requests handlers, which need 
-             * access to the DirectoryServer instance.
-             */
-            installDefaultHandlers();
 
             startNetwork( transport, chain );
         }
+        
+        /*
+         * The server is now initialized, we can
+         * install the default requests handlers, which need 
+         * access to the DirectoryServer instance.
+         */
+        installDefaultHandlers();
+
+        PartitionNexus nexus = getDirectoryService().getPartitionNexus();
+
+        for ( ExtendedOperationHandler h : extendedOperationHandlers )
+        {
+            LOG.info( "Added Extended Request Handler: " + h.getOid() );
+            h.setLdapServer( this );
+            nexus.registerSupportedExtensions( h.getExtensionOids() );
+        }
+
+        nexus.registerSupportedSaslMechanisms( saslMechanismHandlers.keySet() );
 
         if ( replicationProvider != null )
         {
@@ -557,17 +569,6 @@ public class LdapServer extends Director
 
         chainBuilders.add( chainBuilder );
 
-        PartitionNexus nexus = getDirectoryService().getPartitionNexus();
-
-        for ( ExtendedOperationHandler h : extendedOperationHandlers )
-        {
-            LOG.info( "Added Extended Request Handler: " + h.getOid() );
-            h.setLdapServer( this );
-            nexus.registerSupportedExtensions( h.getExtensionOids() );
-        }
-
-        nexus.registerSupportedSaslMechanisms( saslMechanismHandlers.keySet() );
-
         try
         {
             SocketAcceptor acceptor = getSocketAcceptor( transport );



Mime
View raw message