directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1152835 - in /directory/apacheds/trunk: core-annotations/src/main/java/org/apache/directory/server/core/factory/ server-annotations/src/main/java/org/apache/directory/server/annotations/ server-annotations/src/main/java/org/apache/director...
Date Mon, 01 Aug 2011 15:42:34 GMT
Author: elecharny
Date: Mon Aug  1 15:42:31 2011
New Revision: 1152835

URL: http://svn.apache.org/viewvc?rev=1152835&view=rev
Log:
o Moved some DSAnnotation code to a single method, as it will be reused by the ServerAnnotation
method
o Removed the port parameter when creating a new LdapServer, as we always use the Transport
port, or define a random unused one.
o Added a CreateConsumer annotation
o Modifie dthe CreateLdapServer to have it calling the common method from DSAnnotation
o Removed the call to AvailablePortFinder method, it's useless


Added:
    directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateConsumer.java
Modified:
    directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
    directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
    directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java

Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java?rev=1152835&r1=1152834&r2=1152835&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
(original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
Mon Aug  1 15:42:31 2011
@@ -22,6 +22,7 @@ package org.apache.directory.server.core
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.InputStream;
+import java.lang.annotation.Annotation;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.util.HashSet;
@@ -230,26 +231,17 @@ public class DSAnnotationProcessor
             return null;
         }
     }
-
-
-    /**
-     * Create a DirectoryService from an annotation. The @CreateDS annotation
-     * must be associated with either the method or the encapsulating class. We
-     * will first try to get the annotation from the method, and if there is
-     * none, then we try at the class level.
-     * 
-     * @return A valid DS
-     */
-    public static DirectoryService getDirectoryService() throws Exception
+    
+    public static Object getInstance( Class<? extends Annotation> clazz ) throws ClassNotFoundException
     {
-        CreateDS dsBuilder = null;
-
+        Object instance = null;
+        
         // Get the caller by inspecting the stackTrace
         StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
 
         // In Java5 the 0th stacktrace element is:
         // java.lang.Thread.dumpThreads(Native Method)
-        int index = stackTrace[0].getMethodName().equals( "dumpThreads" ) ? 3 : 2;
+        int index = stackTrace[0].getMethodName().equals( "dumpThreads" ) ? 4 : 3;
 
         // Get the enclosing class
         Class<?> classCaller = Class.forName( stackTrace[index].getClassName() );
@@ -264,19 +256,40 @@ public class DSAnnotationProcessor
         {
             if ( methodCaller.equals( method.getName() ) )
             {
-                dsBuilder = method.getAnnotation( CreateDS.class );
+                instance = method.getAnnotation( clazz );
 
-                if ( dsBuilder != null )
+                if ( instance != null )
                 {
                     break;
                 }
             }
         }
+        
+        if ( instance == null )
+        {
+            instance = classCaller.getAnnotation( clazz );
+        }
+        
+        return instance;
+    }
+
 
-        // No : look at the class level
-        if ( dsBuilder == null )
+    /**
+     * Create a DirectoryService from an annotation. The @CreateDS annotation
+     * must be associated with either the method or the encapsulating class. We
+     * will first try to get the annotation from the method, and if there is
+     * none, then we try at the class level.
+     * 
+     * @return A valid DS
+     */
+    public static DirectoryService getDirectoryService() throws Exception
+    {
+        Object instance = getInstance( CreateDS.class );
+        CreateDS dsBuilder = null;
+        
+        if ( instance != null )
         {
-            dsBuilder = classCaller.getAnnotation( CreateDS.class );
+            dsBuilder = (CreateDS)instance;
         }
 
         // Ok, we have found a CreateDS annotation. Process it now.

Added: directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateConsumer.java?rev=1152835&view=auto
==============================================================================
--- directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateConsumer.java
(added)
+++ directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateConsumer.java
Mon Aug  1 15:42:31 2011
@@ -0,0 +1,123 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ *
+ */
+package org.apache.directory.server.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.directory.ldap.client.api.NoVerificationTrustManager;
+import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
+import org.apache.directory.shared.ldap.model.message.SearchScope;
+
+/**
+ * A annotation used to define a replication consumer configuration. Many elements can be
configured :
+ * <ul>
+ *   <li>remoteHost : the remote server's name, defaults to 'localhost'</li>
+ *   <li>remotePort : the remote server's LDAP port, defaults to 389</li>
+ *   <li>replUserDn : The replication User's DN</li>
+ *   <li>replUserPassword : The replication User's password</li>
+ *   <li>refreshNPersist : the replication mode, defaults to 'true'</li>
+ *   <li>refreshInterval : the interval between replications when in refreshOnly mode,
defaults to 60s</li>
+ *   <li>baseDn : the base from which to fetch entries on the remote server</li>
+ *   <li>filter : the filter to select entries,defaults to (ObjectClass=*)</li>
+ *   <li>attributes : the list of attributes to replicate, defaults to all</li>
+ *   <li>searchSizeLimit : the maximum number of entries to fetch, defaults to no limit</li>
+ *   <li>searchTimeout : the maximum delay to wait for entries, defaults to no limit</li>
+ *   <li>searchScope : the scope, defaults to SUBTREE</li>
+ *   <li>aliasDerefMode : set the aliss derefence policy, defaults to NEVER </li>
+ *   <li>cookie : the replication cookie</li>
+ *   <li>replicaId : the replica identifier</li>
+ *   <li>configEntryDn : the configuration entry's DN</li>
+ *   <li>chaseReferrals : tells if we chase referrals, defaults to false</li>
+ *   <li>useTls : the connection uses TLS, defaults to true</li>
+ *   <li>strictCertVerification : strictly verify the certificate, defaults to true</li>
+ *   <li>trustManager : the trustManager to use, defaults to @link{NoVerificationTrustManager}</li>
+ * </ul>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+@Documented
+@Inherited
+@Retention ( RetentionPolicy.RUNTIME )
+@Target ( { ElementType.METHOD, ElementType.TYPE } )
+public @interface CreateConsumer
+{
+    /** host name of the syncrepl remote server, default value is localhost */
+    String remoteHost() default "localhost";
+
+    /** port number of the syncrepl provider server, default is 389 */
+    int remotePort() default 389;
+
+    /** replication user's Dn */
+    String replUserDn();
+
+    /** password for binding with replication user dn */
+    String replUserPassword();
+
+    /** flag to represent refresh and persist or refresh only mode, defaults to true */
+    boolean refreshNPersist() default true;
+
+    /** time interval for successive sync requests, default is 60 seconds */
+    long refreshInterval() default 60 * 1000;
+
+    /** the base Dn whose content will be searched for replicating */
+    String baseDn();
+
+    /** the ldap filter for fetching the entries, default value is (objectClass=*) */
+    String filter() default "(objectClass=*)";
+
+    /** names of attributes to be replicated, default value is all user attributes */
+    String[] attributes() default ""; 
+
+    /** the maximum number of search results to be fetched
+     * default value is 0 (i.e no limit) */
+    int searchSizeLimit() default 0;
+
+    /** the timeout value to be used while doing a search 
+     * default value is 0 (i.e no limit)*/
+    int searchTimeout() default 0;
+
+    /** the search scope, default is sub tree level */
+    SearchScope searchScope() default SearchScope.SUBTREE;
+
+    /** alias dereferencing mode, default is set to 'never deref aliases' */
+    AliasDerefMode aliasDerefMode() default AliasDerefMode.NEVER_DEREF_ALIASES;
+
+    /** the replica's id */
+    int replicaId();
+
+    /** The configuration entry DN */
+    String configEntryDn() default "";
+
+    /** flag to indicate whether to chase referrals or not, default is false hence passes
ManageDsaITControl with syncsearch request*/
+    boolean chaseReferrals() default false;
+
+    /** flag to indicate the use of TLS, default is true */
+    boolean useTls() default true;
+
+    /** flag to indicate the use of strict certificate verification, default is true */
+    boolean strictCertVerification() default true;
+
+    /** the X509 certificate trust manager used, default value set to {@link NoVerificationTrustManager}
*/
+    Class<?> trustManager() default NoVerificationTrustManager.class;
+}

Modified: directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java?rev=1152835&r1=1152834&r2=1152835&view=diff
==============================================================================
--- directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
(original)
+++ directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
Mon Aug  1 15:42:31 2011
@@ -28,6 +28,7 @@ import org.apache.directory.server.annot
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.annotations.SaslMechanism;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.factory.DSAnnotationProcessor;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.kdc.KdcServer;
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
@@ -51,7 +52,7 @@ import org.junit.runner.Description;
  */
 public class ServerAnnotationProcessor
 {
-    private static void createTransports( LdapServer ldapServer, CreateTransport[] transportBuilders,
int startPort )
+    private static void createTransports( LdapServer ldapServer, CreateTransport[] transportBuilders
)
     {
         if ( transportBuilders.length != 0 )
         {
@@ -112,10 +113,10 @@ public class ServerAnnotationProcessor
     
     /**
      * Just gives an instance of {@link LdapServer} without starting it.
-     * For getting a running LdapServer instance see {@link #createLdapServer(CreateLdapServer,
DirectoryService, int)}
-     * @see #createLdapServer(CreateLdapServer, DirectoryService, int)
+     * For getting a running LdapServer instance see {@link #createLdapServer(CreateLdapServer,
DirectoryService)}
+     * @see #createLdapServer(CreateLdapServer, DirectoryService)
      */
-    public static LdapServer instantiateLdapServer( CreateLdapServer createLdapServer, DirectoryService
directoryService, int startPort )
+    public static LdapServer instantiateLdapServer( CreateLdapServer createLdapServer, DirectoryService
directoryService )
     {
         if ( createLdapServer != null )
         {
@@ -124,7 +125,7 @@ public class ServerAnnotationProcessor
             ldapServer.setServiceName( createLdapServer.name() );
             
             // Read the transports
-            createTransports( ldapServer, createLdapServer.transports(), startPort );
+            createTransports( ldapServer, createLdapServer.transports() );
             
             // Associate the DS to this LdapServer
             ldapServer.setDirectoryService( directoryService );
@@ -166,6 +167,7 @@ public class ServerAnnotationProcessor
             }
             
             NtlmMechanismHandler ntlmHandler = ( NtlmMechanismHandler ) ldapServer.getSaslMechanismHandlers().get(
SupportedSaslMechanisms.NTLM );
+           
             if( ntlmHandler != null )
             {
                 Class<?> ntlmProviderClass = createLdapServer.ntlmProvider();
@@ -193,18 +195,37 @@ public class ServerAnnotationProcessor
     
     
     /**
+     * creates an LdapServer and starts before returning the instance, infering
+     * the configuration from the Stack trace
+     *  
+     * @return a running LdapServer instance
+     */
+    public static LdapServer createLdapServer( DirectoryService directoryService ) throws
ClassNotFoundException
+    {
+        Object instance = DSAnnotationProcessor.getInstance( CreateLdapServer.class );
+        LdapServer ldapServer = null;
+        
+        if ( instance != null )
+        {
+            CreateLdapServer createLdapServer = (CreateLdapServer)instance;
+            
+            ldapServer = createLdapServer( createLdapServer, directoryService );
+        }
+
+        return ldapServer;
+    }
+
+    
+    /**
      * creates an LdapServer and starts before returning the instance
      *  
      * @param createLdapServer the annotation containing the custom configuration
      * @param directoryService the directory service
-     * @param startPort a port number to start with in order to find any available port for
use (if the given port number is already in use)<br/>
-     *                  this option will only be used if the port specified in {@link CreateTransport}
annotation is -1.
      * @return a running LdapServer instance
      */
-    public static LdapServer createLdapServer( CreateLdapServer createLdapServer, DirectoryService
directoryService, int startPort )
+    public static LdapServer createLdapServer( CreateLdapServer createLdapServer, DirectoryService
directoryService )
     {
-        
-        LdapServer ldapServer = instantiateLdapServer( createLdapServer, directoryService,
startPort );
+        LdapServer ldapServer = instantiateLdapServer( createLdapServer, directoryService
);
         
         if ( ldapServer == null )
         {
@@ -232,13 +253,13 @@ public class ServerAnnotationProcessor
      * @param startPort The port used by the server
      * @return An LdapServer instance 
      * @throws Exception If the server cannot be started
-     */
-    public static LdapServer createLdapServer( DirectoryService directoryService, int startPort
) throws Exception
+     *
+    public static LdapServer createLdapServer( DirectoryService directoryService ) throws
Exception
     {
         CreateLdapServer createLdapServer = ( CreateLdapServer ) getAnnotation( CreateLdapServer.class
);
         
         // Ok, we have found a CreateLdapServer annotation. Process it now.
-        return createLdapServer( createLdapServer, directoryService, startPort );
+        return createLdapServer( createLdapServer, directoryService );
     }
 
 
@@ -251,13 +272,13 @@ public class ServerAnnotationProcessor
      * @return An LdapServer instance 
      * @throws Exception If the server cannot be started
      */
-    public static LdapServer createLdapServer( Description description, DirectoryService
directoryService, int startPort )
+    public static LdapServer createLdapServer( Description description, DirectoryService
directoryService )
         throws Exception
     {
         CreateLdapServer createLdapServer = description.getAnnotation( CreateLdapServer.class
);
 
         // Ok, we have found a CreateLdapServer annotation. Process it now.
-        return createLdapServer( createLdapServer, directoryService, startPort );
+        return createLdapServer( createLdapServer, directoryService );
     }
 
 

Modified: directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java?rev=1152835&r1=1152834&r2=1152835&view=diff
==============================================================================
--- directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
(original)
+++ directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
Mon Aug  1 15:42:31 2011
@@ -50,7 +50,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.util.JndiUtils;
-import org.apache.mina.util.AvailablePortFinder;
 import org.junit.Test;
 
 
@@ -232,8 +231,7 @@ public class DirectoryServiceAnnotationT
         assertTrue( service.getAdminSession().exists( new Dn( "dc=example,dc=com" ) ) );
 
         // Now, get the server
-        LdapServer ldapServer = ServerAnnotationProcessor.createLdapServer( service, AvailablePortFinder
-            .getNextAvailable( 1024 ) );
+        LdapServer ldapServer = ServerAnnotationProcessor.createLdapServer( service );
 
         // Check that the server is running
         assertTrue( ldapServer.isStarted() );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java?rev=1152835&r1=1152834&r2=1152835&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java
Mon Aug  1 15:42:31 2011
@@ -165,7 +165,7 @@ public class ClientInitialRefreshIT
 
         CreateLdapServer serverAnnotation = createProviderMethod.getAnnotation( CreateLdapServer.class
);
 
-        providerServer = ServerAnnotationProcessor.instantiateLdapServer( serverAnnotation,
provDirService, 0 );
+        providerServer = ServerAnnotationProcessor.instantiateLdapServer( serverAnnotation,
provDirService );
         
         providerServer.setReplicationReqHandler( new SyncReplRequestHandler() );
         

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java?rev=1152835&r1=1152834&r2=1152835&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
Mon Aug  1 15:42:31 2011
@@ -30,6 +30,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.directory.server.annotations.CreateConsumer;
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.CoreSession;
@@ -345,7 +346,7 @@ public class ClientServerReplicationIT
 
         CreateLdapServer serverAnnotation = createProviderMethod.getAnnotation( CreateLdapServer.class
);
 
-        providerServer = ServerAnnotationProcessor.instantiateLdapServer( serverAnnotation,
provDirService, 0 );
+        providerServer = ServerAnnotationProcessor.instantiateLdapServer( serverAnnotation,
provDirService );
         
         providerServer.setReplicationReqHandler( new SyncReplRequestHandler() );
         
@@ -392,15 +393,25 @@ public class ClientServerReplicationIT
              })
     @CreateLdapServer(transports =
         { @CreateTransport( port=17000, protocol = "LDAP") })
-    private static void startConsumer() throws Exception
+    @CreateConsumer
+        (
+            remoteHost = "localhost",
+            remotePort = 16000,
+            replUserDn = "uid=admin,ou=system",
+            replUserPassword = "secret",
+            useTls = false,
+            baseDn = "dc=example,dc=com",
+            refreshInterval = 1000,
+            replicaId = 1
+        )
+    public static void startConsumer() throws Exception
     {
         Method createProviderMethod = ClientServerReplicationIT.class.getDeclaredMethod(
"startConsumer" );
-        CreateDS dsAnnotation = createProviderMethod.getAnnotation( CreateDS.class );
-        DirectoryService provDirService = DSAnnotationProcessor.createDS( dsAnnotation );
+        DirectoryService provDirService = DSAnnotationProcessor.getDirectoryService();
 
         CreateLdapServer serverAnnotation = createProviderMethod.getAnnotation( CreateLdapServer.class
);
 
-        consumerServer = ServerAnnotationProcessor.instantiateLdapServer( serverAnnotation,
provDirService, 0 );
+        consumerServer = ServerAnnotationProcessor.instantiateLdapServer( serverAnnotation,
provDirService );
         
         SyncReplConsumer syncreplClient = new SyncReplConsumer();
         final SyncreplConfiguration config = new SyncreplConfiguration();

Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java?rev=1152835&r1=1152834&r2=1152835&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
(original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
Mon Aug  1 15:42:31 2011
@@ -217,10 +217,7 @@ public class FrameworkRunner extends Blo
             // then use the DS created above
             if ( classLdapServerBuilder != null )
             {
-                int minPort = getMinPort();
-
-                classLdapServer = ServerAnnotationProcessor.createLdapServer( getDescription(),
directoryService,
-                    minPort + 1 );
+                classLdapServer = ServerAnnotationProcessor.createLdapServer( getDescription(),
directoryService );
             }
             else if ( ( suite != null ) && ( suite.getLdapServer() != null ) )
             {
@@ -426,8 +423,7 @@ public class FrameworkRunner extends Blo
             {
                 int minPort = getMinPort();
 
-                methodLdapServer = ServerAnnotationProcessor.createLdapServer( methodDescription,
directoryService,
-                    minPort + 1 );
+                methodLdapServer = ServerAnnotationProcessor.createLdapServer( methodDescription,
directoryService );
             }
 
             if ( methodKdcServerBuilder != null )

Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java?rev=1152835&r1=1152834&r2=1152835&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
(original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
Mon Aug  1 15:42:31 2011
@@ -142,7 +142,7 @@ public class FrameworkSuite extends Suit
     
     private void startLdapServer( Description description ) throws Exception
     {
-        ldapServer = ServerAnnotationProcessor.createLdapServer( description, directoryService,
1024 );
+        ldapServer = ServerAnnotationProcessor.createLdapServer( description, directoryService
);
     }
     
     



Mime
View raw message