how to terminate components
Andreas Unterkircher <[email protected]>
| Newsgroups | gmane.comp.java.smartfrog.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, I'm wondering which is the "best" way to asynchronously terminate a component. Say I have some failure within sfStart and I want to terminate the component immediately. I could call sfTerminate(...). But then I found out that I have to make the subsequent executing lines of sfStart dependent on sfIsTerminating(). So far I understand sfTerminate starts a TerminatorThread thus termination is not "immediately". On the other hand I could throw a SmartFrog exception. But this does not seem appropiate. I understand that SF exceptions are for SF inherent errors and not for components failing for other reasons. What does throwing an SF exception mean ? Would it also terminate other Compounds resp. components then the one which threw the exception ? To sum up: I want to terminate a component immediately on some failure encountered during sfStart. Therefore I use sfTerminate in conjuntion with sfIsTerminating(). Is this the right way to do this ? Thanks for your advice, Andreas ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click