3 Replies Latest reply on Apr 18, 2013 8:46 AM by paul.robinson

    prevent .war from deploying before the XTS service has completed loading

    zhfeng

      Hi all,

       

      we has a xtstest.war which uses ServletContextListener. There is an intermittent failure when registering the recovery module in start(). We found it is because the XTSServiceTestRunnerBean start() before the XTSManagerService in the xts subsystem which is running in the different thread.

      we need to prevent the .war from deploying before the XTS service has completed loading.  xtstest.war has already the dependency of "org.jboss.xts" but I think it can not guard the start() order.

       

      more detail please see the issue https://issues.jboss.org/browse/JBTM-1522

       

      Thanks,

      Amos

        • 1. Re: prevent .war from deploying before the XTS service has completed loading
          paul.robinson

          Amos,

           

          I think the general problem is that we are using a ServletContextListener to initilise the application. This initialisation seems to happen at deployment time of the application, which can happen before the XTS service has completed its startup. As the application initialisation depends on XTS being fully started, this can sometimes fail.

           

          Maybe we could use a different initialisation method, for the application, that occurs after the AS startup is complete, but before it accepts its first request?

           

          Paul.

          • 2. Re: prevent .war from deploying before the XTS service has completed loading
            jaikiran

            Is this AS7 we are talking about? If so, then the XTS subsystem could do the necessary dependency setup in the XTS deployment unit processors. Of course, to do that, there might have to be some kind of indication that a particular deployment is actually relevant for XTS processing.

            • 3. Re: prevent .war from deploying before the XTS service has completed loading
              paul.robinson

              Jaikiran,

               

              Yes, AS7/8 is what we are targetting.

               

              We have plans to provide a higher level API, for use by the application, to register recovery hooks. It is likely that we will put some 'magic' in the XTS subsytem to support this. Therefore, what you suggest should work.

               

              In the short term, I guess the only work-around we have is to poll for availability of the Recovery Manager.

               

              Paul.