Thank you Emmanuel for your suggestions.
Richards Peter.

On Thu, Jan 7, 2016 at 1:09 PM, Emmanuel Lécharny <elecha...@gmail.com>
wrote:

> Le 07/01/16 07:23, Richards Peter a écrit :
> > Thank you Emmanuel for the details.
> >
> > When I read your reply, a doubt popped up in my head. Hence I would like
> to
> > clarify my doubt with you.
> >
> > During the time of closing the the managed sessions(as explained above -
> > closing all the pending sessions.), is there anything that the developer
> > need to perform in order to prevent any new sessions from getting
> > established. Will any new sessions prevent or delay graceful shut down of
> > the service? Is such a mechanism already handled in mina framework?
>
> That's a very valid question, and this is not something we offer atm.
> This is why I suggested to fill a JIRA to add such a critical feature.
>
> We should have a disposeNow() method that shutdown properly the
> IoService, first but stopping the IoAcceptor so that no new sessions can
> be created, then by 'killing' every managed sessions without waiting for
> them to be completed.
>
> There is a way to mitigate the intial problem, but it will induce a delay :
> - dispose the IoAcceptor first
> - add the idle even support in your IoHandler, and combined with a flag
> set when you call dispose(), shutdown every session that are iddling.
> After a very short period of time(depending on the iddle delay),
> everything will have been cleaned up.
>
> This is clearly a workaround :/
>
>

Reply via email to