[jboss-dev-forums] [JBoss AS7 Development] - Re: Overall control of graceful shutdown
Brian Stansberry
do-not-reply at jboss.com
Wed Sep 22 09:59:36 EDT 2010
Brian Stansberry [http://community.jboss.org/people/bstansberry%40jboss.com] created the discussion
"Re: Overall control of graceful shutdown"
To view the discussion, visit: http://community.jboss.org/message/563085#563085
--------------------------------------------------------------
The GracefulShutdownTerminator would be registered in start(StartContext). If the shutdown isn't meant to be graceful, the MSC would trigger an overall stop (probably by stopping a root service all the others depend on) and then would immediately invoke all the GracefulShutdownTerminators. So waiting until stop() to register the terminator would not work.
I smell a possible race there though even with registering in start().
Your question about the deployments/connector gets into the real heart of the issue, how subsystems and services that are part of a deployment can be composed such that the dependencies work out. I think it's worthwhile to think through how to do that, since whether or not the GracefulShutdownTerminator idea makes sense, using the MSC dependency mechanism is very likely going to be needed to get graceful shutdown to work.
For example, as *part* of a war deployment there could be a service that monitors the existence of active sessions during shutdown. It depends on some other service in the deployment (e.g. the session manager) and on the connector. The connector will not stop until that service stops. That service registers the GracefulShutdownTerminator.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563085#563085]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20100922/ef33675a/attachment.html
More information about the jboss-dev-forums
mailing list