[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: How to add custom code to JBoss shutdown hook

francis17101970 do-not-reply at jboss.com
Wed Oct 15 08:41:07 EDT 2008


As far as I know you can add a shutdown hook to the JVM, so if you don't find other solutions you might consider starting jBoss from a Java process...

Runtime.getRuntime().addShutdownHook(new Thread() {
  |       public void run() {
  |         System.out.println("Going to shutdown.....");
  |                 while(true);
  |       }
  |     };
  | 

Hope it helps
regards


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182385#4182385

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182385



More information about the jboss-user mailing list