You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Steve Johns <st...@gmail.com> on 2008/04/06 17:42:38 UTC

ConnectionThrottleFilter

I wonder whether ConnectionThrottleFilter misses
"nextFilter.sessionCreated(session);" in sessionCreated function? Without
it, my IoHandlerAdapter sessionCreated function never got called. Once I put
"nextFilter.sessionCreated(session);", the IoHandlerAdapter sessionCreated
function works just fine.

 public void sessionCreated(NextFilter nextFilter, IoSession session)
            throws Exception {
        if (!isConnectionOk(session)) {
            logger.warn("Connections coming in too fast; closing.");
            session.close();
        }

       nextFilter.sessionCreated(session);
    }

Re: ConnectionThrottleFilter

Posted by Steve Johns <st...@gmail.com>.
You are welcome.

On Mon, Apr 7, 2008 at 7:12 PM, "이희승 (Trustin Lee) <tr...@gmail.com>
wrote:

> Hi Steve,
>
> Thank for reporting the bug.  I've filed a JIRA issue and checked in the
> fix.
>
> https://issues.apache.org/jira/browse/DIRMINA-566
>
> HTH,
>
> Steve Johns wrote:
> > I wonder whether ConnectionThrottleFilter misses
> > "nextFilter.sessionCreated(session);" in sessionCreated function?
> Without
> > it, my IoHandlerAdapter sessionCreated function never got called. Once I
> put
> > "nextFilter.sessionCreated(session);", the IoHandlerAdapter
> sessionCreated
> > function works just fine.
> >
> >  public void sessionCreated(NextFilter nextFilter, IoSession session)
> >             throws Exception {
> >         if (!isConnectionOk(session)) {
> >             logger.warn("Connections coming in too fast; closing.");
> >             session.close();
> >         }
> >
> >        nextFilter.sessionCreated(session);
> >     }
> >
>
> --
> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
>
>

Re: ConnectionThrottleFilter

Posted by 이희승 (Trustin Lee) <t...@gmail.com>.
Hi Steve,

Thank for reporting the bug.  I've filed a JIRA issue and checked in the
fix.

https://issues.apache.org/jira/browse/DIRMINA-566

HTH,

Steve Johns wrote:
> I wonder whether ConnectionThrottleFilter misses
> "nextFilter.sessionCreated(session);" in sessionCreated function? Without
> it, my IoHandlerAdapter sessionCreated function never got called. Once I put
> "nextFilter.sessionCreated(session);", the IoHandlerAdapter sessionCreated
> function works just fine.
> 
>  public void sessionCreated(NextFilter nextFilter, IoSession session)
>             throws Exception {
>         if (!isConnectionOk(session)) {
>             logger.warn("Connections coming in too fast; closing.");
>             session.close();
>         }
> 
>        nextFilter.sessionCreated(session);
>     }
> 

-- 
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/