1 Reply Latest reply on Apr 19, 2002 7:10 PM by Adrian Brock

    How to determine that JBoss has finished startup

    Roman Wittchen Newbie

      Hi folks !

      Is it possible to determine programmatically that JBoss has already finished the whole startup process ? (some kind of polling)

      The reason why I am asking this is, because I want to start JBoss from within an ANT task. Therefore I would like to write a small programm that starts JBoss and waits until JBoss has finished the startup process. After that the small programm should stop and the ANT task should proceed (for example to start some JUnit tests).

      Thanks for your help in advance.


        • 1. Re: How to determine that JBoss has finished startup
          Adrian Brock Master


          The short answer is that JBoss has never finished
          starting up, because of the hot-deployment.

          But, you should be able to achieve what you want with
          JBoss3.0 by polling the state on the
          URlDeploymentScanner for 3=Started,
          or in JBoss2 with the AutoDeployer.
          You will need a piece of code that makes a
          remote connection to JBoss's MBeanServer,
          either using RMI or EJB.

          Under the current rules, the relevant MBean has finished
          when all initial services/deployments are complete, unless
          they spawn threads to do other work, but even then
          you should be ok.

          I would anticipate that in future the startup will
          move to multi-threaded, but by the time this happens,
          your question will be irrelevant and any remote clients
          will wait for services they require to come up or
          find another clustered server that can process their