You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Wolter Eldering (JIRA)" <ji...@apache.org> on 2006/12/17 19:35:21 UTC

[jira] Created: (DIRMINA-324) ProtocolCodecFilter can not be dynamicly be replaced by another.

ProtocolCodecFilter can not be dynamicly be replaced by another.
----------------------------------------------------------------

                 Key: DIRMINA-324
                 URL: http://issues.apache.org/jira/browse/DIRMINA-324
             Project: MINA
          Issue Type: Bug
          Components: Filter
    Affects Versions: 1.0
            Reporter: Wolter Eldering
            Priority: Minor


ProtocolCodecFilter can not be dynamicly added and removed because the encoder en decoder attributes are not removed from the IoSession when the ProtocolCodecFilter is removed.

Index: core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
===================================================================
--- core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java    (revision 487691)
+++ core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java    (working copy)
@@ -141,6 +141,12 @@
         }
     }
 
+    public void onPostRemove(IoFilterChain parent, String name, NextFilter nextFilter) throws Exception {
+      disposeEncoder(parent.getSession());
+      disposeDecoder(parent.getSession());
+    }
+
+
     public void messageReceived( NextFilter nextFilter, IoSession session, Object message ) throws Exception
     {
         if( !( message instanceof ByteBuffer ) )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira