directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r709809 - /directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
Date Sun, 02 Nov 2008 00:28:36 GMT
Author: elecharny
Date: Sat Nov  1 17:28:35 2008
New Revision: 709809

URL: http://svn.apache.org/viewvc?rev=709809&view=rev
Log:
o Added the messageSent() hooks, which does nothing, just to avoid getting some exception
with MINA 2
o Removed the chain initialization in the protocolHandler, it's done somewhere else

Modified:
    directory/apacheds/branches/apacheds-mina2/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java

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=709809&r1=709808&r2=709809&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
Sat Nov  1 17:28:35 2008
@@ -31,9 +31,7 @@
 import org.apache.directory.shared.ldap.message.ResultResponse;
 import org.apache.directory.shared.ldap.message.ResultResponseRequest;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
-import org.apache.mina.core.filterchain.IoFilterChain;
 import org.apache.mina.core.session.IoSession;
-import org.apache.mina.filter.codec.ProtocolCodecFilter;
 import org.apache.mina.filter.ssl.SslFilter;
 import org.apache.mina.handler.demux.DemuxingIoHandler;
 import org.slf4j.Logger;
@@ -77,14 +75,12 @@
     public void sessionCreated( IoSession session ) throws Exception
     {
         LdapSession ldapSession = new LdapSession( session );
-        IoFilterChain filters = session.getFilterChain();
-        filters.addLast( "codec", new ProtocolCodecFilter( ldapService.getProtocolCodecFactory()
) );
         ldapService.getLdapSessionManager().addLdapSession( ldapSession );
     }
 
 
     /*
-     * (non-Javadoc)
+     * (non-Javadoc)LdapProtocolHandler
      * @see org.apache.mina.common.IoHandlerAdapter#sessionClosed(org.apache.mina.common.IoSession)
      */
     public void sessionClosed( IoSession session )
@@ -125,7 +121,18 @@
             }
         }
     }
+
     
+    /*
+     * (non-Javadoc)
+     * @see org.apache.mina.handler.demux.DemuxingIoHandler#messageReceived(org.apache.mina.common.IoSession,
java.lang.Object)
+     */
+    public void messageSent( IoSession session, Object message ) throws Exception
+    {
+    	// Do nothing : we have to ignore this message, otherwise we get an exception,
+    	// thanks to the way MINA 2 works ...
+	}
+
 
     /*
      * (non-Javadoc)



Mime
View raw message