Apache Directory Project - Re: [mina] unbind

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > October 2005 > Re: [mina] unbind





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: [mina] unbind
Trustin Lee

2005-10-05, 8:45 pm

Hello Maarten,

This is a known issue: http://issues.apache.org/jira/browse/DIRMINA-93

We'll provide a setter or a unbind method with an extra parameter to make
acceptors close all client connections immediately.

Thanks,
Trustin

2005/10/6, Maarten Bosteels <m.bosteels-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>:
>
> Hello,
>
> I am checking out MINA and it looks very interesting.
>
> My first question: when I call unbind(service) or unbindAll() on a
> SimpleServiceRegistry
> will it wait until all running I/O events are handled ?
>
> In other words: suppose my IoHandlerAdapter implementation looks like this
>
> public void dataRead( IoSession session, ByteBuffer rb )
> {
> ByteBuffer wb = ByteBuffer.allocate( 4 );
> int res = somethingThatTakesSomeTime();
> wb.putInt ( res );
> wb.flip();
> session.write( wb, null );
> }
>
> And thread_x calls unbindAll() while thread_y is busy with
> somethingThatTakesSomeTime().
> Will unbindAll() wait until dataRead() finishes or will thread_y get
> interrupted somehow ?
>
> I guess I could just try it out, but I would rather like to know what is
> the intended behaviour.
>
> On a sidenote: is it common to create a 'private' shutdownService (only
> accepting connections from localhost)
> that just waits for a shutdown command, and then tries to gracefully
> shutdown ?
> (like Tomcat does on port 8005)
>
> Thanks
> Maarten
>
>
>



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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com