Hello Please forgive me if I do not understand the way Merlin thinks and allow me to throw some thoughts for further discussion (though it may already have been suggested with Merlin vocabulary):
1. Depending of whether Merlin is the top-most container within a JVM or it is embedded within another JVM, the shutdown call is different. With Merlin as the top-most container, you would want to call System.exit. With Merlin as the embedded container, you would want to either shutdown Merlin or send a signal to the top-most container about the desire of shutting down the system. In the latter, the top-most container will decide whether to shutdown or not. 2. Say you have Shutdown facility that could be built outside Merlin Kernel, though it could also be built within the kernel. Any component and client code, local or remote, should be able to send a signal to the Shutdown facility. 3. Shutdown facility decides whether to shutdown or not. There may be some conditions to be fulfilled before a shutdown takes place. a. Probably the most important is to check the security permission of "the one sending", the caller, the shutdown signal. The caller could be identified based on different criteria. Back in pre-JAAS world, Codebase could be the criteria. In post-JAAS world, either Codebase or Subject could be among the candidates. Bear in mind that the caller can be identified by various techniques, and the above examples are just few of the many alternatives. b. Probably some cleanup is desired before shutdown. The facility may check for pending elements and wait for a time-out before a force shutdown takes place. c. It may be an idea to make the shutdown facility an interface, such that different implementations be developed for different needs. Best Regards -- Nader Aeinehchi Aasenhagen 66 E 2020 Skedsmokorset NORWAY Direct and Mobile +47 41 44 29 57 Tel (private): +47 64 83 09 08 Fax +47 64 83 08 07 www.aeinehchi.com ----- Original Message ----- From: "Justin Permar" <[EMAIL PROTECTED]> To: "Avalon framework users" <[EMAIL PROTECTED]> Sent: Monday, May 17, 2004 8:24 PM Subject: Re: How do I shut down Merlin from within a component? > Every application knows when and how it should exit. Are you > saying that a shutdown request should only come from an entity > external to the system? That doesn't make much sense to me. > > The only approach for now is just to kill the process? > > How can components, if not the whole system, be shut down on > demand? That is, it might at least be an option for us to > shutdown all application components, and then kill the > process... nasty, but if there are no other options... > > Justin > > ---- Original message ---- > >Date: Sun, 16 May 2004 21:36:34 +0200 > >From: Stephen McConnell <[EMAIL PROTECTED]> > >Subject: Re: How do I shut down Merlin from within a component? > >To: Avalon framework users <[EMAIL PROTECTED]> > > > >Scott Brickner wrote: > >> If a component determines that the application should end, > how does it > >> tell Merlin to shut down all of the components and exit? > > > >Currently your cannot (unless you do something really *nasty* > like > >System.exit). Thing is a component is not in control and > should not be > >making these sort of assumptions. On the other-hand - a > facility could > >be provided with such a option in the future - however keep > in mind that > > this would probably be matched with the ability for another > facility > >to veto a shutdown. > > > >Stephen. > > > >-- > > > >|---------------------------------------| > >| Magic by Merlin | > >| Production by Avalon | > >| | > >| http://avalon.apache.org | > >|---------------------------------------| > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
