directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r894833 - in /directory/apacheds/branches/apacheds-schema: protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/ server-annotations/src/main/java/org/apache/directory/server/factory/ server-annotations/src/tes...
Date Thu, 31 Dec 2009 12:49:18 GMT
Author: elecharny
Date: Thu Dec 31 12:49:16 2009
New Revision: 894833

URL: http://svn.apache.org/viewvc?rev=894833&view=rev
Log:
Fixed the port error

Modified:
    directory/apacheds/branches/apacheds-schema/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/TcpTransport.java
    directory/apacheds/branches/apacheds-schema/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
    directory/apacheds/branches/apacheds-schema/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java

Modified: directory/apacheds/branches/apacheds-schema/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/TcpTransport.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/TcpTransport.java?rev=894833&r1=894832&r2=894833&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/TcpTransport.java
(original)
+++ directory/apacheds/branches/apacheds-schema/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/TcpTransport.java
Thu Dec 31 12:49:16 2009
@@ -149,7 +149,7 @@
         }
         else
         {
-            socketAddress = new InetSocketAddress( address, port );
+             socketAddress = new InetSocketAddress( address, port );
         }
         
         acceptor.setDefaultLocalAddress( socketAddress );

Modified: directory/apacheds/branches/apacheds-schema/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java?rev=894833&r1=894832&r2=894833&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
(original)
+++ directory/apacheds/branches/apacheds-schema/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
Thu Dec 31 12:49:16 2009
@@ -38,11 +38,11 @@
  */
 public class ServerAnnotationProcessor
 {
-    private static void createTransports( LdapServer ldapServer, CreateTransport[] transportBuilders
)
+    private static void createTransports( LdapServer ldapServer, CreateTransport[] transportBuilders,
int startPort )
     {
         if ( transportBuilders.length != 0 )
         {
-            int createdPort = 1024;
+            int createdPort = startPort;
             
             for ( CreateTransport transportBuilder : transportBuilders )
             {
@@ -86,7 +86,7 @@
     }
     
     
-    private static LdapServer createLdapServer( CreateLdapServer createLdapServer, DirectoryService
directoryService )
+    private static LdapServer createLdapServer( CreateLdapServer createLdapServer, DirectoryService
directoryService, int startPort )
     {
         if ( createLdapServer != null )
         {
@@ -95,7 +95,7 @@
             ldapServer.setServiceName( createLdapServer.name() );
             
             // Read the transports
-            createTransports( ldapServer, createLdapServer.transports() );
+            createTransports( ldapServer, createLdapServer.transports(), startPort );
             
             // Associate the DS to this LdapServer
             ldapServer.setDirectoryService( directoryService );
@@ -119,7 +119,7 @@
     }
 
     
-    public static LdapServer getLdapServer( DirectoryService directoryService ) throws Exception
+    public static LdapServer getLdapServer( DirectoryService directoryService, int startPort
) throws Exception
     {
         CreateLdapServer createLdapServer = null;
         
@@ -155,15 +155,15 @@
         }
         
         // Ok, we have found a CreateLdapServer annotation. Process it now.
-        return createLdapServer( createLdapServer, directoryService );
+        return createLdapServer( createLdapServer, directoryService, startPort );
     }
 
 
-    public static LdapServer getLdapServer( Description description, DirectoryService directoryService
) throws Exception
+    public static LdapServer getLdapServer( Description description, DirectoryService directoryService,
int startPort ) throws Exception
     {
         CreateLdapServer createLdapServer = description.getAnnotation( CreateLdapServer.class
);
 
         // Ok, we have found a CreateLdapServer annotation. Process it now.
-        return createLdapServer( createLdapServer, directoryService );
+        return createLdapServer( createLdapServer, directoryService, startPort );
     }
 }

Modified: directory/apacheds/branches/apacheds-schema/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java?rev=894833&r1=894832&r2=894833&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
Thu Dec 31 12:49:16 2009
@@ -229,7 +229,7 @@
         assertTrue( service.getAdminSession().exists( new LdapDN( "dc=example,dc=com" ) )
);
 
         // Now, get the server
-        LdapServer ldapServer = ServerAnnotationProcessor.getLdapServer( service );
+        LdapServer ldapServer = ServerAnnotationProcessor.getLdapServer( service, 1024 );
 
         // Check that the server is running
         assertTrue( ldapServer.isStarted() );



Mime
View raw message