3 Replies Latest reply on Feb 13, 2003 10:04 AM by juhalindfors

    Howto get event/signal "Deploy has finished"

    nikolaj

      Hi Jbossers,

      We're using Jboss with Tomcat. My problem is that I cant deploy my war until Jboss has finished deploying. Is there a way to solve this from a programming point of view - for example a java client waiting for an event (listener).. and copy the file over.

      Also, I could check from inside Jboss - and then copy the file then. At that time the CATALINA_HOME is set, so it should be okay.

      Any input is appreciated. Thanks.

      /nikolajg

        • 1. Re: Howto get event/signal "Deploy has finished"

          is this with embedded tomcat or are you running in two separate processes waiting for JBoss to finish deploying EJB's?

          • 2. Re: Howto get event/signal "Deploy has finished"
            nikolaj

            Hi Juha,

            Im running Jboss 3.0.4 and Tomcat 4.1.18 as seperate apps. Sorry, forgot that information. The problem is that we have to wait about 1.5 minute before Jboss has deployed. We especially have the problem if the server for some reason had a crash and the services has to restart. At the moment Im using a sleep program (in win32 c) - the restart procedure is put in a bat file called from the windows service. Anyway, no matter how the situation is it would be nice to "catch" some signal from Jboss. I need the the same feature in Junit.

            Thanks.

            /nikolaj

            • 3. Re: Howto get event/signal "Deploy has finished"

              There are JMX notifications emitted from Main Deployer when deploy is run but unfortunately this is *before* the service create() and start() are invoked.

              I think easiest is to just extend the EJB deployer and add your own notification mechanism to the relevant methods (JMX or some other). This should be fairly trivial to accomplish. Then just modify your JBoss config to register your custom EJB deployer (with notifications) to the server instead of the default.

              HTH