3 Replies Latest reply on Jun 11, 2006 2:50 PM by Tom Muldoon

    Shutdown JBoss gracefully when it fails to deploy a critical

    Poorab Shah Newbie

      Question:
      Is it possible to shutdown JBoss gracefully when it fails to deploy a critical service?

      I override the 'startService()' method where I read some config files, initialize some thread pools, etc. In case I get an exception at this stage, I want to ensure that JBoss does not start up.

      I can do a System.exit(0) in the catch blocks - but there has to be a better way wherein a particular type of MBeanException hints the JBoss deployer, to undeploy other services/EJBs & do a graceful shutdown. This way I don't effect other processes - that were deployed correctly & were processing requests when the JVM was halted!

      I can also set alerts that scrape thru the logs & make sure there are none, before the server takes traffic.

      Any ideas? Thanks.