[JBoss AS Development] - Re: Graceful Shutdown
by bstansberry@jboss.com
"bstansberry(a)jboss.com" wrote : "emuckenhuber" wrote : Hmm graceful shutdown should not be part of the MC bean lifecycle, as it would then always shutdown in a graceful manner. This should be an optional way to shutdown AS - triggered with a different signal or management action.
| | Additionally with the graceful shutdown there will most likely be a timeout which then is going just stop AS. This does not seem to fit very well with MC lifecycle actions, since we would basically need to interrupt a action during a state transition (pre_stop -> stop).
|
| With the acceptor concept we should be able to deal with these issues even though we're essentially using the MC lifecycle.
|
| The acceptors can all be registered with a central management bean that can set a property as to how long they should wait to return from stop(). -1, don't do anything, just return, 0 wait as long as it takes, > 0, wait that long. The default is -1 or something configurable at the server level. The management console sets to something else if a graceful shutdown is invoked.
As I wrote this it felt hacky, and it is. Emanuel, your instincts and Jason's are right; this isn't really an MC issue. It's a step in the shutdown process that occurs before the normal undeployment process starts. If we have a bunch of acceptors, whatever is controlling the shutdown can tell them to stop; we don't need the MC to do it. That is back to the original design we discussed in Westford.
"jason.greene(a)redhat.com" wrote : Let me give an example. Someone defines a service A, which supports remote invocation. There is no dependency between service A and the EJB container (Service B), because it doesn't make sense (they have nothing to do with each other). Then instance SFSB Foo of Service B *dynamically* decides to call service A during an invocation. Then during "graceful" shutdown, service A is stopped first.
Jason, are you concerned about solving this case (eventually), or are you just using it to make a point about dependencies? Segregating internal calls from those coming via remote endpoints, and then closing off the remote endpoints before stopping/undeploying anything will handle most such cases. The only ones it won't are where Service B makes a remote call to non-HA Service A, even though both are deployed locally. Which case is IMHO out of scope. :-)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267561#4267561
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267561
14 years, 5 months
[JBoss Microcontainer Development] - Double Module::reset invocation
by alesj
"flavia.rainone(a)jboss.com" wrote :
| - the call to Module.reset() is duplicated.AbstractLevelClassLoaderSystemDeployer.removeClassLoader() directly invokes reset; and VFSClassLoaderDescribeDeployer invokes it indirectly, as it invokes ClassLoading.removeModule() which in turn invokes reset.
| Is this expected? In the case of the class pools, RegisterModuleCallback is invoked by ClassLoading.removeModule(). At this point, ClassLoading hasn't reset the module yet, but AbstractLevelCLSystemDeployer has already done it. Despite that, RegisterModuleCallback needs to retrieve the package names, thus causing the module to reload the capability collection.. To get rid of this overhead, of course I could add a map to keep track of the package names associated with a module, avoiding the call to module.getPackageNames(). But isn't it expected that other module registries being notified of a removeModule may want to use the capability collection of the module as well? If the answer is yes, I think the module shouldn't be reset at this time.
|
This is an old discussion, that as I see it now, never got properly resolved:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=146461
"flavia.rainone(a)jboss.com" wrote :
| - I noticed that the PackageVisitor.determineAllPackages method returns the META-INF as an exported package name. Is this filtered out sometime later during execution?
How else would a call to ClassLoader::getResource("META-INF/some-config.xml") work? ;-)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267550#4267550
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267550
14 years, 5 months
[JBoss Microcontainer Development] - VFS deployers and CL behaviour
by flavia.rainone@jboss.com
During debugging of the class pool/vfs tests, two things called my attention:
- the call to Module.reset() is duplicated.AbstractLevelClassLoaderSystemDeployer.removeClassLoader() directly invokes reset; and VFSClassLoaderDescribeDeployer invokes it indirectly, as it invokes ClassLoading.removeModule() which in turn invokes reset.
Is this expected? In the case of the class pools, RegisterModuleCallback is invoked by ClassLoading.removeModule(). At this point, ClassLoading hasn't reset the module yet, but AbstractLevelCLSystemDeployer has already done it. Despite that, RegisterModuleCallback needs to retrieve the package names, thus causing the module to reload the capability collection.. To get rid of this overhead, of course I could add a map to keep track of the package names associated with a module, avoiding the call to module.getPackageNames(). But isn't it expected that other module registries being notified of a removeModule may want to use the capability collection of the module as well? If the answer is yes, I think the module shouldn't be reset at this time.
- I noticed that the PackageVisitor.determineAllPackages method returns the META-INF as an exported package name. Is this filtered out sometime later during execution?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267533#4267533
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267533
14 years, 5 months