You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Paolo Perrucci <p....@ludonet.it> on 2005/09/29 16:00:25 UTC

[mina] How to implement graceful shutdown

Hi all,

I want to implement a graceful shutdown mechanism for a simple 
MyApplicationServer using mina.
I want to realize a shutdown() method that block accepting connections 
and wait for all connected client to exit closing their connections.
Doing some tests, it seems that SimpleServiceRegistry.unbind() methods 
stops thread pool so I must close the active connections BEFORE unbind 
the service.
Is there a "suggested" way to do this?

Thanks
Paolo

Re: [mina] How to implement graceful shutdown

Posted by Trustin Lee <tr...@gmail.com>.
We'll release 0.8 before this October ends.

HTH,
Trustin

2005/9/30, Paolo Perrucci <p....@ludonet.it>:
>
> Thank you Trustin,
>
> is there a release date plan for 0.8 ?
>
> Bye
> Paolo
>
> Trustin Lee ha scritto:
>
> > Hi Paolo,
> >
> > 2005/9/29, Paolo Perrucci <p.perrucci@ludonet.it
> > <ma...@ludonet.it>>:
> >
> > I want to implement a graceful shutdown mechanism for a simple
> > MyApplicationServer using mina.
> > I want to realize a shutdown() method that block accepting connections
> > and wait for all connected client to exit closing their connections.
> > Doing some tests, it seems that SimpleServiceRegistry.unbind() methods
> > stops thread pool so I must close the active connections BEFORE unbind
> > the service.
> > Is there a "suggested" way to do this?
> >
> >
> > For now, you have to track all sessions open by yourself (using
> > HashSet), close all open session before calling unbindAll(), and call
> > unbindAll(). We know this issue and will be fixed in 0.8.
> >
> > Please watch this issue here to get notified when this issues is fixed:
> >
> > http://issues.apache.org/jira/browse/DIRMINA-93
> >
> > Thanks,
> > Trustin
> > --
> > what we call human nature is actually human habit
> > --
> > http://gleamynode.net/
>
>
> --
> =================================
> Paolo Perrucci
> Program Manager
>
> p.perrucci@ludonet.it
> paolo.perrucci@eutelia.it
>
> Ludonet S.p.A.
> www.ludonet.org <http://www.ludonet.org>
>
> EUTELIA
> Via G.V. Bona, 67
> 00156 (GRA Tiburtina) ROMA ITALIA
>
> telefono +39 06.41797.205
> fax +39 06.41797.898
> =================================
>
>


--
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [mina] How to implement graceful shutdown

Posted by Paolo Perrucci <p....@ludonet.it>.
Thank you Trustin,

is there a release date plan for 0.8 ?

Bye
Paolo

Trustin Lee ha scritto:

> Hi Paolo,
>
> 2005/9/29, Paolo Perrucci <p.perrucci@ludonet.it 
> <ma...@ludonet.it>>:
>
>     I want to implement a graceful shutdown mechanism for a simple
>     MyApplicationServer using mina.
>     I want to realize a shutdown() method that block accepting connections
>     and wait for all connected client to exit closing their connections.
>     Doing some tests, it seems that SimpleServiceRegistry.unbind() methods
>     stops thread pool so I must close the active connections BEFORE unbind
>     the service.
>     Is there a "suggested" way to do this?
>
>
> For now, you have to track all sessions open by yourself (using 
> HashSet), close all open session before calling unbindAll(), and call 
> unbindAll().  We know this issue and will be fixed in 0.8.
>
> Please watch this issue here to get notified when this issues is fixed:
>
> http://issues.apache.org/jira/browse/DIRMINA-93
>
> Thanks,
> Trustin
> -- 
> what we call human nature is actually human habit
> -- 
> http://gleamynode.net/ 


-- 
=================================
Paolo Perrucci
Program Manager

p.perrucci@ludonet.it
paolo.perrucci@eutelia.it

Ludonet S.p.A.
www.ludonet.org

EUTELIA
Via G.V. Bona, 67
00156 (GRA Tiburtina) ROMA ITALIA

telefono +39 06.41797.205
fax      +39 06.41797.898
=================================


Re: [mina] How to implement graceful shutdown

Posted by Trustin Lee <tr...@gmail.com>.
Hi Paolo,

2005/9/29, Paolo Perrucci <p....@ludonet.it>:
>
> I want to implement a graceful shutdown mechanism for a simple
> MyApplicationServer using mina.
> I want to realize a shutdown() method that block accepting connections
> and wait for all connected client to exit closing their connections.
> Doing some tests, it seems that SimpleServiceRegistry.unbind() methods
> stops thread pool so I must close the active connections BEFORE unbind
> the service.
> Is there a "suggested" way to do this?


For now, you have to track all sessions open by yourself (using HashSet),
close all open session before calling unbindAll(), and call unbindAll(). We
know this issue and will be fixed in 0.8.

Please watch this issue here to get notified when this issues is fixed:

http://issues.apache.org/jira/browse/DIRMINA-93

Thanks,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/