dev@glassfish.java.net

Re: [V3] Web container not destroyed during domain shutdown

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Tue, 12 Aug 2008 14:18:46 -0700

Byron Nevins wrote:
> It would be interesting to comment out the sledgehammer and then just
> start and stop GF and see what happens nowadays
> The sledgehammer hides any new problems that can be added like
> non-daemon threads left running.

Yes, possibly. But the requirements are conflicting. In non-embedded case,
user does not like a server that refuses to go down ;) and hence System.exit
is probably the last resort that's there in code today.

Can you try doing equivalent of --force false on stop-domain?
That would ensure no System.exit is called.

BTW, what's the embedded API for stopping the server?

-Kedar

>
> Kedar Mhaswade wrote:
>>
>>
>> Jan.Luehe_at_Sun.COM wrote:
>>>
>>> Kedar Mhaswade wrote:
>>>
>>>>
>>>>
>>>> Byron Nevins wrote:
>>>>
>>>>> I noticed this behavior in embedded -- a clean shutdown of GF is
>>>>> impossible, the System.exit() sledgehammer has to be used...
>>>>
>>>>
>>>> Why? Who does not "normally" respond to the "stop" call?
>>>
>>>
>>> Is there any "stop" event?
>>>
>>
>> When asadmin stop-domain is called, here is what happens:
>> - iterate through inhabitants that satisfy the "Startup" Contract
>> and call the Inhabitant.release() method on it. An example of
>> startup service is:
>> "com.sun.enterprise.v3.services.impl.GrizzlyService"
>>
>>
>> Finally, System.exit is called because the "force" option is true
>> by default. I am not sure what we can do to address both embedded
>> and non-embedded case w.r.t. this.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>