you could do something like:

new Throwable().printStackTrace();



On 3/21/07, Nicolas FROMENT <[EMAIL PROTECTED]> wrote:


Hi all !
I think I have the same problem. Only on linux, when I shutdown my
server and try to restart it immediatly I got an Address Already In Use
message.
I use unbindAll too. I wonder if unbindAll is synchronous. I mean after
calling it may I consider that the port is unbound  or no ? Trustin, you
ask about "capturing the full thread dump" after the call, What do you
mean and how can I do this ?

Thks for your help

Nicolas

Uday Prakash (DHL CZ) a écrit :
> Hi Trustin,
>
> Thank you for that suggestion, I shall look into it.
>
> -U
>
> -----Original Message-----
> From: Trustin Lee [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 21, 2007 4:27 AM
> To: [email protected]
> Subject: Re: Shutting down a server elegantly
>
> Hi Uday,
>
> On 3/21/07, Uday Prakash (DHL CZ) <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> I've been working on a small tcp/ip server, that listens for specific
>> messages and then depending on the message type performs a particular
>> task. That was the easy part, I was looking into shutting down the
>> server in an elegant manner. I decided that I'll be listening on a
>> particular port say 'SHUTDOWN_PORT' and when I receive a pre-defined
>> message to shutdown, I shall shut the server down.
>>
>> To do so, I call on acceptor.unbindAll() and shutdown the executor
>> services. As the documentation points, but what I see is that the
>> threads continue to stay alive. Is there something I'm doing wrong?
>>
>> A little direction would help.
>>
>
> All remaining threads should be daemon threads once the port is
> unbound, and therefore the VM should exit automatically.   If the VM
> doesn't exit automatically, please capture the full thread dump after
> unbindAll() operation, and send it here so we can analyze the cause of
> the problem.
>
> HTH,
> Trustin
>


--
******************************************************************
Nicolas Froment         [EMAIL PROTECTED]
Software Architect

Hi-Stor Technologies        www.histor.fr
23 bd Victor Hugo            Std:    +33 (0) 562 12 14 40 (Voice)
Bâtiment Socrate             Fax:    +33 (0) 562 12 14 49
31770 Colomiers
FRANCE

****************************************************************




--
..Cheers
Mark

Reply via email to