3 Replies Latest reply on Mar 14, 2012 8:09 AM by k_benary

    Lifecycle notifications on AS7

    k_benary

      Hi all,

       

      in earlier versions of the JBoss AS we could register to the server (jboss.system:type=Server) and/or to deployers (jboss.system:service=MainDeployer, jboss.system:service=JARDeployer, jboss.j2ee:service=EARDeployer) in order to receive notifications on server startup, server shutdown, and application status changes. Is there any way to achieve this or something similar on AS7?

       

      Thanks in advance.

      Klaus Benary

        • 1. Re: Lifecycle notifications on AS7
          k_benary

          May be this question was too silly to spend a word on it. Anyway, we solved this problem.

          • 2. Re: Lifecycle notifications on AS7
            method_ben_qc

            Hi,

             

            How did you solve this problem ?

             

            Thx

            • 3. Re: Lifecycle notifications on AS7
              k_benary

              Hi,

               

              first of all a word about our problem: We currently deploy a couple of well isolated applications to the JBoss, each of them in a separate jar. However, there is a master application among them which – after a server start up - performs system wide initializations. And this master applications used to be registered to the deployers and received their notifications. So it was able to find out when all applications were deployed and could then start these initializations.

               

              Our JBoss7 solution is a bit awkward, but nevertheless it works for us: Like before, we use automatic application deployment by putting the jars into the deployment folder. Our master application gets the deployment scanner MBean from the local MBeanServer ("jboss.as:subsystem=deployment-scanner,scanner=default") and picks up the information about the location of the deployment directory. Then it watches the deployment marker files in and below this directory until all .isdeploying markers have gone. This is the time to start the initialization.

               

              Klaus