On Sun, 2004-05-16 at 15:36, Stephen McConnell wrote:
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.
Hm. So this means the various suggestions we've seen on using Merlin for GUI apps are kind of pointless - I mean, there are very few GUI apps that don't need to exit. And it's normally just going to be some menu option that triggers it - a "normal component".
In my particular case, there are scenarios that happen in which a component can decide that it cannot continue. Generally, this happens because of a network routing failure. The conditions are detected by IOExceptions within the component, and the appropriate response is for the entire system to be shut down - if the system continues to run, then when the router recovers, the system will be in a state that makes it difficult to directly recover. By shutting down and redeploying the component, everything would work much better.
My approach would be to create a system that does the setup of the kernel and provides a reference to the kernel interface to a dedicated shell facility.
The facility would do things like:
* setup the GUI root environment using a series of
well defined components from services dealing with
menubar, window context, help systems, error management,
login handling, etc. * dynamically setup containers and components based on events
coming from user interaction or the environment * handle invocation of shutdown on the kernel in response to
GUI or system eventsStephen.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
|---------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org | |---------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
