[jboss-as7-dev] Notification of shutdown commencing

David M. Lloyd david.lloyd at redhat.com
Mon Apr 9 12:12:00 EDT 2012


More thinking leads me to this conclusion:  we add a container-stop 
operation; server shutdown still calls exit(); shutdown hook calls 
container-stop.  This way the container is always stopped, and the VM 
always shuts down in response to the shutdown operation.

The only problem is that I'm not sure we'll be able to call operations 
during the execution of the shutdown operation.  We might have to just 
duplicate the handler code or something like that.

On 04/09/2012 10:59 AM, Brian Stansberry wrote:
> On 4/9/12 10:35 AM, David M. Lloyd wrote:
>> I've added the requisite feature to MSC (see MSC-112) and am planning a
>> 1.1.0.Beta1 release.
>>
>
> Thanks.
>
>> One thing to consider is that currently the server shutdown op handler
>> just calls System.exit().  So our order of operations is pretty much
>> completely turned around at this point.  But I think that the op handler
>> could simply be modified to shut down the service container.
>>
>
> Yep. For this reason I hesitated a bit before saying +1 before, but I
> think this approach is better than some alternative like adding another
> method to the MSC TerminateListener (breaks impls) or adding another
> redundant listener API to ServiceContainer.
>
>> On 04/09/2012 09:19 AM, Brian Stansberry wrote:
>>> +1
>>>
>>> On 4/7/12 6:11 PM, Jason Greene wrote:
>>>> Sounds good
>>>>
>>>> Sent from my iPhone
>>>>
>>>> On Apr 7, 2012, at 12:10 PM, "David M. Lloyd"<david.lloyd at redhat.com>     wrote:
>>>>
>>>>> On 04/06/2012 02:55 PM, Brian Stansberry wrote:
>>>>>> I can't figure out a way to produce a notification of an impending
>>>>>> server shutdown if a user does a soft kill of the server process.
>>>>>>
>>>>>> It's easy enough if shutdown is initiated by a management op; the op
>>>>>> handler can trigger the notification. But a soft kill triggers a
>>>>>> shutdown hook registered by the MSC ServiceContainer, and once that
>>>>>> starts, services start stopping semi-randomly and its too late to notify
>>>>>> anyone that that is going to start happening.
>>>>>>
>>>>>> The MSC shutdown stuff isn't exposed, so there's no way to tie into
>>>>>> that. Adding another shutdown hook doesn't help as there's no
>>>>>> predictable order of execution.
>>>>>
>>>>> Originally I had assumed (wrongly) at some level that AS 7 would be
>>>>> completely service-oriented as 5 and 6 were.  The reality is that AS 7
>>>>> is oriented around management, not services.  I still think that a
>>>>> service-oriented VM is a valid use case for MSC, however I think that
>>>>> this is not the case in AS 7.  So I think I should introduce an option
>>>>> to disable the shutdown hook in MSC, and instead we should create one
>>>>> for AS 7 which executes a shutdown management operation.
>>>>>
>>>>> WDYT?
>>>>> --
>>>>> - DML
>>>>> _______________________________________________
>>>>> jboss-as7-dev mailing list
>>>>> jboss-as7-dev at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>> _______________________________________________
>>>> jboss-as7-dev mailing list
>>>> jboss-as7-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>
>>>
>>
>>
>
>


-- 
- DML


More information about the jboss-as7-dev mailing list