[JBoss-user] [Installation, Configuration & Deployment] - Re: Why System.exit in MBean can not halt the JVM??

2005-09-22 Thread yielruse
yeah. Done. Thanks to all people who have give me a hand. When use shutdown() in MBean, the JBoss can't really shutdown. When use exit(int) in MBean, the JBoss will shutdown after deploying all deployment,. When use halt(int) in MBean, the JBoss immediately shutdown. Thus, I use halt

[JBoss-user] [Installation, Configuration & Deployment] - Re: Why System.exit in MBean can not halt the JVM??

2005-09-22 Thread yielruse
Because I must shutdown the JBoss when the my application server's initializaion is not complete. So far I don't know any other way to stop JBoss except calling System.exit(). But now, I will take your advice to try to use shutdown() method in org.jboss.system.Server. View the original post :

[JBoss-user] [Installation, Configuration & Deployment] - Re: Why System.exit in MBean can not halt the JVM??

2005-09-22 Thread Frito
So why don't you call shutdown() on the MBean jboss.system.Server? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3896296#3896296 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3896296 --

[JBoss-user] [Installation, Configuration & Deployment] - Re: Why System.exit in MBean can not halt the JVM??

2005-09-22 Thread yielruse
THX. But my purpose is to stop JBoss via calling System.exit(), not to prevent others to halt the JVM. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3896263#3896263 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3896

[JBoss-user] [Installation, Configuration & Deployment] - Re: Why System.exit in MBean can not halt the JVM??

2005-09-22 Thread Frito
If I should have to write an application server, I would install a SecurityManager with an overwritten checkExit method, so nobody can halt the system just by calling System.exit() within deployed code ;-) Read this regarding threads (daemon threads) and the system exit. http://java.sun.com/j2se

[JBoss-user] [Installation, Configuration & Deployment] - Re: Why System.exit in MBean can not halt the JVM??

2005-09-21 Thread yielruse
I don't think so. Well, in the javadoc of System.exit(int ), it says that: the method will halt the entire JVM. When the entire JVM is halted, then all threads running in it will be certainly terminated. So your guess is not possible. Any other advice please. View the original post : http://

[JBoss-user] [Installation, Configuration & Deployment] - Re: Why System.exit in MBean can not halt the JVM??

2005-09-19 Thread PeterJ
Here is my guess. JBoss is muti-threaded. The only thing that System.exti(-1) accomplished is that it killed the thread you were running on and set the program exit code. The other threads are still running. To successfully kill the whole application, you must terminate all of the threads.