8 Replies Latest reply on Nov 2, 2009 11:41 AM by thomasgo

    Touching application.xml doesn't reload exploded EAR

    thomasgo

      Hi,

      I have an exploded EAR file deployed in an external folder. The application starts up fine in JBoss 4.2.3.GA (contrary to my last post ;) ).

      However, when I touch the application.xml (e.g. by rebuilding the app with maven) the server doesn't react. Nothing, nada, ....

      The same holds true when I deploy an exploded war and touch web.xml.

      Shouldn't JBoss reload the app if I touch the main XML? Or do I have to tell JBoss to do so?

      Thanks in advance.

      Thomas

        • 1. Re: Touching application.xml doesn't reload exploded EAR
          vickyk

           

          "ThomasGo" wrote:

          Shouldn't JBoss reload the app if I touch the main XML? Or do I have to tell JBoss to do so?

          yes it should and it will.
          What is the deployment scan period defined in $JBOSS_HOME/server/node/conf/jboss-service.xml?

          • 2. Re: Touching application.xml doesn't reload exploded EAR
            thomasgo

            I found the reason: another slash was missing at the end of the deployment URL.

            Without it, the application loaded fine but did not reload. With the slash everything works as expected.

            Strange though, that JBoss has such an inconsistent behavior. Shouldn't it refuse to load the app if the slash was missing?

            Anyways, thanks for your help.

            • 3. Re: Touching application.xml doesn't reload exploded EAR
              jaikiran

              Where was the slash missing? Can you post the exact file contents (the file which you are talking about)?

              • 4. Re: Touching application.xml doesn't reload exploded EAR
                thomasgo

                Well, it was jboss-service.xml.

                It didn't work when I set the urls to this:

                deploy/,file:///C:/Development/Projects/MyApp/web/client/webapp (myapp.ear is a subdirectory of this).

                When I added the slash to the end, it worked:

                deploy/,file:///C:/Development/Projects/MyApp/web/client/webapp/

                But maybe I found a reason: according to the documentation, JBoss is considering the .../webapp directory as the application's dir and myapp.ear as a nested module. So it loaded the module but only reloads the app if the main project's descriptor is touched (which would be missing if webapp had been considered to be the main porject).

                Is this correct?

                • 5. Re: Touching application.xml doesn't reload exploded EAR
                  jaikiran

                  I see what you mean, now. The trailing slash indicates that the folder will contain applications. If the trailing slash is not present then the folder itself is considered an application. That's what my understanding is with how it worked in 4.x AS. See Peter's reply here http://www.jboss.org/index.html?module=bb&op=viewtopic&t=163135#4263202

                  There was one more thread where there was an explanation (/bug report?) about how the hot deployment behaves (probably weirdly) with applications deployed external to the AS structure in JBoss AS 4.x, but i don't seem to find that thread now.

                  • 6. Re: Touching application.xml doesn't reload exploded EAR
                    thomasgo

                    Thanks for the info.

                    • 7. Re: Touching application.xml doesn't reload exploded EAR
                      peterj

                      The one weirdness I recall from using external directories in 4.x is that they are scanned only during startup. Thus hot deployment, redeployment, etc. does not work in them.

                      To be more accurate, only the first deployment directory listed is subject to hot deployment. In some cases, listing the external directory first, and thus the servers/xxx/deploy directory second, was beneficial because the server/xxx/deploy directory would never be rescanned after startup.

                      This all changed in AS 5.x - all of the deployment directories are scanned by the hot deployer . But then in AS 5.x you can only specify directories, not archives, in the deployment URLList, IIRC.

                      • 8. Re: Touching application.xml doesn't reload exploded EAR
                        thomasgo

                        As far I I am concerned hot deployment works for external directories, too.
                        My problem was the missing slash at the end that made JBoss think the external directory resembled that app and not a deployment directory.