directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r550374 - /directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
Date Mon, 25 Jun 2007 06:04:28 GMT
Author: erodriguez
Date: Sun Jun 24 23:04:27 2007
New Revision: 550374

URL: http://svn.apache.org/viewvc?view=rev&rev=550374
Log:
Enabled TCP support for DNS in ServerContextFactory to resolve DIRSERVER-123 (Add support
for TCP).

Modified:
    directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java

Modified: directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java?view=diff&rev=550374&r1=550373&r2=550374
==============================================================================
--- directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
(original)
+++ directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
Sun Jun 24 23:04:27 2007
@@ -108,6 +108,7 @@
     private static ChangePasswordServer udpChangePasswordServer;
     private static NtpServer tcpNtpServer;
     private static NtpServer udpNtpServer;
+    private static DnsServer tcpDnsServer;
     private static DnsServer udpDnsServer;
     private DirectoryService directoryService;
 
@@ -218,18 +219,28 @@
             
             if ( log.isInfoEnabled() )
             {
-                log.info( "Unbind of NTP Service complete: " + udpNtpServer );
+                log.info( "Unbind of NTP Service (UDP) complete: " + udpNtpServer );
             }
             
             udpNtpServer = null;
         }
 
+        if ( tcpDnsServer != null )
+        {
+            tcpDnsServer.destroy();
+            if ( log.isInfoEnabled() )
+            {
+                log.info( "Unbind of DNS Service (TCP) complete: " + tcpDnsServer );
+            }
+            tcpDnsServer = null;
+        }
+
         if ( udpDnsServer != null )
         {
             udpDnsServer.destroy();
             if ( log.isInfoEnabled() )
             {
-                log.info( "Unbind of DNS Service complete: " + udpDnsServer );
+                log.info( "Unbind of DNS Service (UDP) complete: " + udpDnsServer );
             }
             udpDnsServer = null;
         }
@@ -638,6 +649,13 @@
             DatagramAcceptorConfig udpConfig = new DatagramAcceptorConfig();
             udpConfig.setThreadModel( threadModel );
 
+            SocketAcceptorConfig tcpConfig = new SocketAcceptorConfig();
+            tcpConfig.setDisconnectOnUnbind( false );
+            tcpConfig.setReuseAddress( true );
+            tcpConfig.setFilterChainBuilder( new DefaultIoFilterChainBuilder() );
+            tcpConfig.setThreadModel( threadModel );
+
+            tcpDnsServer = new DnsServer( dnsConfig, tcpAcceptor, tcpConfig, store );
             udpDnsServer = new DnsServer( dnsConfig, udpAcceptor, udpConfig, store );
         }
         catch ( Throwable t )



Mime
View raw message