7 Replies Latest reply on Nov 14, 2003 6:59 PM by fkutzler

    Is it possible that unpacked war is to be hot deploy?

    netiskra

      jboss3.2.1 with jetty is unpacked to C:/jboss

      foo.war directory is placed at D:/foo.war

      foo.war is worked well. But hot deploy is not work.

      for example..

      HelloWorldServlet.java

      .
      .
      System.out.println("first step"); ---> System.out.println("changed first step");
      .
      .

      After edit the file and compile it.. "change first step" is not applied. If jboss is restarted then change is applied.

      Do you know why? What I have to do?

      Thanks for your response. ^^

        • 1. Re: Is it possible that unpacked war is to be hot deploy?
          jonlee

          In an unpacked WAR, for a change other than to JSPs to deploy, you must change the date (touch or ant touch) of the WEB-INF/web.xml.

          • 2. Re: Is it possible that unpacked war is to be hot deploy?
            netiskra

            Thanks.
            It's well done.

            But I think that it is inconvenient for developing with many developers. Is there any other way?

            • 3. Re: Is it possible that unpacked war is to be hot deploy?
              jonlee

              There is no other way to change the deployment scanner. It is the most sensible approach. You could change the scanner to look at every file, but that would slow down the application server significantly - SilverStream in that development mode is extremely slow for even one developer. This would be more inconvenient for many developers.

              • 4. Re: Is it possible that unpacked war is to be hot deploy?
                netiskra

                Thanks. Your answer is very useful to me. ^^

                • 5. Re: Is it possible that unpacked war is to be hot deploy?
                  fkutzler

                  I tried this and it didn't seem to work. By "touch" do you mean to simply do something that will give a new timestamp to the web.xml file? I made an inconsequential edit, and saved the file. But I did not see the change in the class file in the exploded war.

                  • 6. Re: Is it possible that unpacked war is to be hot deploy?
                    jonlee

                    Yes. Just change the timestamp (to a more recent value than the previous value). Check the server.log to see a redeployment of the application. You'll see an undeploy - redeploy sequence.

                    2003-11-15 10:33:27,775 INFO [org.jboss.jetty] Successfully undeployed file:/usr/local/JBoss-3.2.2/server/default/deploy/jmx-console.war/
                    2003-11-15 10:33:27,921 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/usr/local/JBoss-3.2.2/server/default/deploy/jmx-console.war/
                    2003-11-15 10:33:29,478 INFO [org.jboss.jetty] Registered jboss.jetty:Server=0,JBossWebApplicationContext=10,context=/jmx-console
                    2003-11-15 10:33:32,276 INFO [org.jboss.jetty] Started WebApplicationContext[/jmx-console,file:/usr/local/JBoss-3.2.2/server/default/deploy/jmx-console.war/]
                    2003-11-15 10:33:32,794 INFO [org.jboss.jetty] Registered 2003-11-15
                    
                    ...
                    
                    10:33:32,916 INFO [org.jboss.jetty] successfully deployed file:/usr/local/JBoss-3.2.2/server/default/deploy/jmx-console.war/ to /jmx-console
                    2003-11-15 10:33:33,049 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/usr/local/JBoss-3.2.2/server/default/deploy/jmx-console.war/


                    If you don't see a successful redeploy, there could be issues like class locks because an object still exists in memory and the classes in an application won't undeploy. Common for Struts where the Struts classes are packed in the WAR.

                    • 7. Re: Is it possible that unpacked war is to be hot deploy?
                      fkutzler

                      Actually, I was just about to post that I had figured it out based on something you wrote in response to another question. I added a trailing "/" to my tag in jboss-service.xml, and that did the trick.

                      Thanks a million.