directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r713978 - in /directory/apacheds/branches/apacheds-mina2: mitosis/src/main/java/org/apache/directory/mitosis/service/ mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ protocol-changepw/src/main/java/org/apache/di...
Date Fri, 14 Nov 2008 11:25:38 GMT
Author: elecharny
Date: Fri Nov 14 03:25:15 2008
New Revision: 713978

URL: http://svn.apache.org/viewvc?rev=713978&view=rev
Log:
Fixed the code accordingly to the last MINA API modification (there is no more close() method
for IoSession, it has been replaced by a close(boolean) method)

Modified:
    directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/ClientConnectionManager.java
    directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/DefaultReplicationContext.java
    directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
    directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
    directory/apacheds/branches/apacheds-mina2/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
    directory/apacheds/branches/apacheds-mina2/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolHandler.java
    directory/apacheds/branches/apacheds-mina2/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java
    directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java
    directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
    directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapService.java
    directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java
    directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/UnbindHandler.java
    directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/GracefulShutdownHandler.java
    directory/apacheds/branches/apacheds-mina2/protocol-ntp/src/main/java/org/apache/directory/server/ntp/protocol/NtpProtocolHandler.java

Modified: directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/ClientConnectionManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/ClientConnectionManager.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/ClientConnectionManager.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/ClientConnectionManager.java
Fri Nov 14 03:25:15 2008
@@ -306,7 +306,7 @@
                         {
                             LOG.info( "[Replica-{}] Closed connection to Replica-{}", configuration.getReplicaId(),
                                     con.replicaId );
-                            con.session.close();
+                            con.session.close( true );
                         }
                     }
                 }

Modified: directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/DefaultReplicationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/DefaultReplicationContext.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/DefaultReplicationContext.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/DefaultReplicationContext.java
Fri Nov 14 03:25:15 2008
@@ -214,7 +214,7 @@
             {
                 logger.warn( "No response within " + configuration.getResponseTimeout()
                     + " second(s) for message #" + message.getSequence() );
-                getSession().close();
+                getSession().close( true );
             }
         }
     }

Modified: directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
Fri Nov 14 03:25:15 2008
@@ -210,7 +210,7 @@
             logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                 + "] Unexpected exception.", cause );
         }
-        ctx.getSession().close();
+        ctx.getSession().close( true );
     }
 
 
@@ -226,7 +226,7 @@
         {
             logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                 + "] Login attempt failed: " + message.getResponseCode() );
-            ctx.getSession().close();
+            ctx.getSession().close( true );
             return;
         }
 
@@ -246,7 +246,7 @@
                     logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                         + "] Peer address mismatches: " + ctx.getSession().getRemoteAddress()
+ " (expected: "
                         + replica.getAddress() );
-                    ctx.getSession().close();
+                    ctx.getSession().close( true );
                     return;
                 }
             }
@@ -254,7 +254,7 @@
 
         logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
             + "] Unknown peer replica ID: " + message.getReplicaId() );
-        ctx.getSession().close();
+        ctx.getSession().close( true );
     }
 
 
@@ -297,7 +297,7 @@
         {
             logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                 + "] Remote peer failed to execute a log entry." );
-            ctx.getSession().close();
+            ctx.getSession().close( true );
         }
     }
 
@@ -322,7 +322,7 @@
         {
             logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                 + "] Failed to get update vector.", e );
-            ctx.getSession().close();
+            ctx.getSession().close( true );
             return;
         }
 
@@ -463,7 +463,7 @@
             {
                 logger.warn( "Remote update vector (" + yourUV
                     + ") is out-of-date.  Full replication is required." );
-                ctx.getSession().close();
+                ctx.getSession().close( true );
                 return;
             }
         }
@@ -487,6 +487,6 @@
     private void onUnexpectedMessage( ReplicationContext ctx, Object message )
     {
         logger.warn( "Unexpected message: " + message );
-        ctx.getSession().close();
+        ctx.getSession().close( true );
     }
 }

Modified: directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
Fri Nov 14 03:25:15 2008
@@ -123,7 +123,7 @@
     {
         logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                 + "] Unexpected exception.", cause );
-        ctx.getSession().close();
+        ctx.getSession().close( true );
     }
 
 
@@ -134,7 +134,7 @@
             logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                 + "] No login attempt in " + ctx.getConfiguration().getResponseTimeout()
                 + " second(s)." );
-            ctx.getSession().close();
+            ctx.getSession().close( true );
         }
     }
 
@@ -167,7 +167,7 @@
                     ctx.getSession().write(
                             new LoginAckMessage( message.getSequence(), Constants.NOT_OK,
ctx.getConfiguration()
                                     .getReplicaId() ) );
-                    ctx.getSession().close();
+                    ctx.getSession().close( true );
                     return;
                 }
             }
@@ -177,7 +177,7 @@
                 + "] Unknown peer replica ID: " + message.getReplicaId() );
         ctx.getSession().write(
             new LoginAckMessage( message.getSequence(), Constants.NOT_OK, ctx.getConfiguration().getReplicaId()
) );
-        ctx.getSession().close();
+        ctx.getSession().close( true );
     }
 
     
@@ -258,6 +258,6 @@
     {
         logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                 + "] Unexpected message: " + message );
-        ctx.getSession().close();
+        ctx.getSession().close( true );
     }
 }

Modified: directory/apacheds/branches/apacheds-mina2/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
Fri Nov 14 03:25:15 2008
@@ -115,7 +115,7 @@
     public void exceptionCaught( IoSession session, Throwable cause )
     {
         log.debug( session.getRemoteAddress() + " EXCEPTION", cause );
-        session.close();
+        session.close( true );
     }
 
 

Modified: directory/apacheds/branches/apacheds-mina2/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolHandler.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolHandler.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolHandler.java
Fri Nov 14 03:25:15 2008
@@ -92,7 +92,7 @@
         logger.error("EXCEPTION CAUGHT ", cause);
         cause.printStackTrace(System.out);
 
-        session.close();
+        session.close( true );
     }
 
     public void messageReceived(IoSession session, Object message)

Modified: directory/apacheds/branches/apacheds-mina2/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java
Fri Nov 14 03:25:15 2008
@@ -109,7 +109,7 @@
     public void exceptionCaught( IoSession session, Throwable cause )
     {
         LOG.error( session.getRemoteAddress() + " EXCEPTION", cause );
-        session.close();
+        session.close( true );
     }
 
 

Modified: directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java
Fri Nov 14 03:25:15 2008
@@ -125,7 +125,7 @@
     public void exceptionCaught( IoSession session, Throwable cause )
     {
         log.error( session.getRemoteAddress() + " EXCEPTION", cause );
-        session.close();
+        session.close( true );
     }
 
 

Modified: directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
Fri Nov 14 03:25:15 2008
@@ -113,7 +113,7 @@
         {
             try
             {
-                ldapSession.getIoSession().close();
+                ldapSession.getIoSession().close( true );
             }
             catch ( Throwable t )
             {
@@ -209,6 +209,6 @@
         session.write( NoticeOfDisconnect.PROTOCOLERROR );
         LdapSession ldapSession = this.ldapService.getLdapSessionManager().removeLdapSession(
session );
         cleanUpSession( ldapSession );
-        session.close();
+        session.close( true );
     }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapService.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapService.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapService.java
Fri Nov 14 03:25:15 2008
@@ -397,7 +397,7 @@
             for ( WriteFuture future:writeFutures )
             {
                 future.await( 1000L );
-                sessionIt.next().close();
+                sessionIt.next().close( true );
             }
         }
         catch ( Exception e )

Modified: directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java
Fri Nov 14 03:25:15 2008
@@ -482,7 +482,7 @@
                     try
                     {
                         future.awaitUninterruptibly( 1000L );
-                        CloseFuture cfuture = selected.getIoSession().close();
+                        CloseFuture cfuture = selected.getIoSession().close( true );
                         cfuture.awaitUninterruptibly( 1000L );
                     }
                     catch ( Exception e1 )

Modified: directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/UnbindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/UnbindHandler.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/UnbindHandler.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/UnbindHandler.java
Fri Nov 14 03:25:15 2008
@@ -44,7 +44,7 @@
         try
         {
             session.getCoreSession().unbind( request );
-            session.getIoSession().close();
+            session.getIoSession().close( true );
             ldapService.getLdapSessionManager().removeLdapSession( session.getIoSession()
);
         }
         catch ( Throwable t )

Modified: directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/GracefulShutdownHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/GracefulShutdownHandler.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/GracefulShutdownHandler.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/GracefulShutdownHandler.java
Fri Nov 14 03:25:15 2008
@@ -154,7 +154,7 @@
         {
             LOG.error( "Failed to write GracefulShutdownResponse to client: " + requestor.getRemoteAddress()
);
         }
-        requestor.close();
+        requestor.close( true );
     }
 
 
@@ -254,7 +254,7 @@
             try
             {
                 future.join( 1000 );
-                sessionIt.next().close();
+                sessionIt.next().close( true );
             }
             catch ( Exception e )
             {

Modified: directory/apacheds/branches/apacheds-mina2/protocol-ntp/src/main/java/org/apache/directory/server/ntp/protocol/NtpProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-ntp/src/main/java/org/apache/directory/server/ntp/protocol/NtpProtocolHandler.java?rev=713978&r1=713977&r2=713978&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-ntp/src/main/java/org/apache/directory/server/ntp/protocol/NtpProtocolHandler.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-ntp/src/main/java/org/apache/directory/server/ntp/protocol/NtpProtocolHandler.java
Fri Nov 14 03:25:15 2008
@@ -85,7 +85,7 @@
     public void exceptionCaught( IoSession session, Throwable cause )
     {
         log.error( session.getRemoteAddress() + " EXCEPTION", cause );
-        session.close();
+        session.close( true );
     }
 
 



Mime
View raw message