Sorry for coming back so late.
We were already closing the session in our implementation of the IoHandlerAdapter.exceptionCaught() but that did not seem to help. I tried closing the session in our implementation of SSLFilter.exceptionCaught()as you suggested. Unfortunately I can still see the leaks. Will have to dig further.

Cheers,
Chris.



On 30/07/17 01:22, Emmanuel Lécharny wrote:

Le 29/07/2017 à 23:15, Christoph John a écrit :
Hi,

thanks, I'll test what you suggested.
I've noticed that we have an exceptionCaught handler in one of our
classes which extend the MINA IoHandlerAdapter. How is that different
from the exceptionCaught handler in the filter?
No difference. The filter hadles events the same way the IoHandler does,
except that those events are handled by the filters *before* it reaches
the handler.

Actually, once a filter handles an event, it may passes it to the next
filter, and ultimately it bubbles up to the hoHandler. Here is the
Logging filter implementation :

     @Override
     public void exceptionCaught(NextFilter nextFilter, IoSession
session, Throwable cause) throws Exception {
         log(exceptionCaughtLevel, "EXCEPTION :", cause);
         nextFilter.exceptionCaught(session, cause);
     }


As you can see it calls the next filter exceptionCaught event. The last
filter in a chain is the TailFilter (you don't have to add it in your
chain, it's always there) and it calls your handler :


         @Override
         public void exceptionCaught(NextFilter nextFilter, IoSession
session, Throwable cause) throws Exception {
             AbstractIoSession s = (AbstractIoSession) session;

             try {
                 s.getHandler().exceptionCaught(s, cause);
             } finally {
                 if (s.getConfig().isUseReadOperation()) {
                     s.offerFailedReadFuture(cause);
                 }
             }
         }





--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[email protected]
        


http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------
        
----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
         Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------
        
----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

Reply via email to