directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r730185 - in /directory/apacheds/trunk: protocol-changepw/src/main/java/org/apache/directory/server/changepw/ protocol-dns/src/main/java/org/apache/directory/server/dns/ protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/k...
Date Tue, 30 Dec 2008 17:18:43 GMT
Author: elecharny
Date: Tue Dec 30 09:18:42 2008
New Revision: 730185

URL: http://svn.apache.org/viewvc?rev=730185&view=rev
Log:
Closed more Acceptors (to avoid some Too many open files)

Modified:
    directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapService.java
    directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java?rev=730185&r1=730184&r2=730185&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java
(original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java
Tue Dec 30 09:18:42 2008
@@ -21,7 +21,6 @@
 
 
 import java.io.IOException;
-import java.net.InetSocketAddress;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -271,8 +270,7 @@
         if ( getDatagramAcceptor() != null )
         {
             getDatagramAcceptor().setHandler( new ChangePasswordProtocolHandler( this, store
) );
-            getDatagramAcceptor().bind( 
-                new InetSocketAddress( getUdpTransport().getAddress(), getUdpTransport().getPort()
) );
+            getDatagramAcceptor().bind();
         }
 
         if ( getSocketAcceptor() != null )
@@ -280,8 +278,7 @@
             getSocketAcceptor().setCloseOnDeactivation( false );
             getSocketAcceptor().setReuseAddress( true );
             getSocketAcceptor().setHandler( new ChangePasswordProtocolHandler( this, store
) );
-            getSocketAcceptor().bind( 
-                new InetSocketAddress( getTcpTransport().getAddress(), getTcpTransport().getPort()
) );
+            getSocketAcceptor().bind();
         }
         
         LOG.info( "ChangePassword service started." );
@@ -293,13 +290,11 @@
     {
         if ( getDatagramAcceptor() != null )
         {
-            getDatagramAcceptor().unbind( 
-                new InetSocketAddress( getUdpTransport().getAddress(), getUdpTransport().getPort()
) );
+            getDatagramAcceptor().dispose(); 
         }
         if ( getSocketAcceptor() != null )
         {
-            getSocketAcceptor().unbind( 
-                new InetSocketAddress( getTcpTransport().getAddress(), getTcpTransport().getPort()
) );
+            getSocketAcceptor().dispose(); 
         }
 
         LOG.info( "ChangePassword service stopped." );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java?rev=730185&r1=730184&r2=730185&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java
Tue Dec 30 09:18:42 2008
@@ -21,7 +21,6 @@
 
 
 import java.io.IOException;
-import java.net.InetSocketAddress;
 
 import org.apache.directory.server.dns.protocol.DnsProtocolHandler;
 import org.apache.directory.server.dns.store.RecordStore;
@@ -80,8 +79,7 @@
         if ( getDatagramAcceptor() != null )
         {
             getDatagramAcceptor().setHandler( new DnsProtocolHandler( this, store ) );
-            getDatagramAcceptor().bind( 
-                new InetSocketAddress( getUdpTransport().getAddress(), getUdpTransport().getPort()
) );
+            getDatagramAcceptor().bind();
         }
 
         if ( getSocketAcceptor() != null )
@@ -89,8 +87,7 @@
             getSocketAcceptor().setCloseOnDeactivation( false );
             getSocketAcceptor().setReuseAddress( true );
             getSocketAcceptor().setHandler( new DnsProtocolHandler( this, store ) );
-            getSocketAcceptor().bind(
-                new InetSocketAddress( getTcpTransport().getAddress(), getTcpTransport().getPort()
) );
+            getSocketAcceptor().bind();
         }
         
         LOG.info( "DSN service started." );
@@ -101,13 +98,12 @@
     public void stop() {
         if ( getDatagramAcceptor() != null )
         {
-            getDatagramAcceptor().unbind( 
-                new InetSocketAddress( getUdpTransport().getAddress(), getUdpTransport().getPort()
) );
+            getDatagramAcceptor().dispose();
         }
+        
         if ( getSocketAcceptor() != null )
         {
-            getSocketAcceptor().unbind( 
-                new InetSocketAddress( getTcpTransport().getAddress(), getUdpTransport().getPort()
) );
+            getSocketAcceptor().dispose();
         }
         
         LOG.info( "DSN service stopped." );

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java?rev=730185&r1=730184&r2=730185&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java
Tue Dec 30 09:18:42 2008
@@ -464,7 +464,6 @@
             
             // Bind to the configured address
             udpAcceptor.bind();
-            System.out.println( "Bound UDP <" + udpAcceptor.getDefaultLocalAddress() +
">" );
         }
 
         Transport tcpTransport = getTcpTransport();
@@ -497,7 +496,6 @@
             
             // Bind to the configured address
             tcpAcceptor.bind();
-            System.out.println( "Bound TCP <" + tcpAcceptor.getDefaultLocalAddress() +
">" );
         }
         
         LOG.info( "Kerberos service started." );
@@ -509,12 +507,11 @@
     {
         if ( getDatagramAcceptor() != null )
         {
-            System.out.println( "Unbinding UDP <" + getDatagramAcceptor().getDefaultLocalAddress()
+ ">" );
             getDatagramAcceptor().dispose();
         }
+        
         if ( getSocketAcceptor() != null )
         {
-            System.out.println( "Unbinding TCP <" + getSocketAcceptor().getDefaultLocalAddress()
+ ">" );
             getSocketAcceptor().dispose();
         }
         

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapService.java?rev=730185&r1=730184&r2=730185&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapService.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapService.java
Tue Dec 30 09:18:42 2008
@@ -407,7 +407,7 @@
                 return;
             }
 
-            getSocketAcceptor().unbind();
+            getSocketAcceptor().dispose();
 
             if ( LOG.isInfoEnabled() )
             {

Modified: directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java?rev=730185&r1=730184&r2=730185&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java
(original)
+++ directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java
Tue Dec 30 09:18:42 2008
@@ -32,7 +32,6 @@
 import org.apache.mina.transport.socket.SocketAcceptor;
 
 import java.io.IOException;
-import java.net.InetSocketAddress;
 
 
 /**
@@ -137,14 +136,12 @@
     {
         if ( getDatagramAcceptor() != null )
         {
-            getDatagramAcceptor().unbind( new InetSocketAddress( 
-                getUdpTransport().getAddress(), getUdpTransport().getPort() ) );
+            getDatagramAcceptor().dispose();
         }
         
         if ( getSocketAcceptor() != null )
         {
-            getSocketAcceptor().unbind( new InetSocketAddress( 
-                getTcpTransport().getAddress(), getTcpTransport().getPort() ) );
+            getSocketAcceptor().dispose();
         }
     }
     



Mime
View raw message