6 Replies Latest reply on Aug 19, 2004 6:21 AM by icordoba

    HELP! Redeploying webapps - how's it done?

    casanova

      Hi,
      I have been trying to find out for months how/if the following can be done, without success.
      JBoss-2.4.0_Tomcat-3.2.2
      I have a webapp which can't be hotdeployed as a war file because it requires some classpath infomation to be specified in a props file using relative paths. That's not the problem.

      When I change some of the servlets (bug fixes etc), if I don't stop/start JBoss/Tomcat, I get "Proxy" exceptions (as expected because the classes differ), and I therefore have to manually restart JBoss to reload the webapp. This is a pain because an ISP is hosting this, which means I have to arrange for them to restart JBoss.

      Is there ANY way that non-hotdeployed webapps can be reloaded/redeployed remotely (eg via 8082) without restarting JBoss?

      Any assistance with this would be REALLY appreciated.

        • 1. Re: HELP! Redeploying webapps - how's it done?

          You cannot hotdeploy from the classpath.
          Hot deploy works by throwing away and
          recreating classloaders,
          the classpath doesn't have a classloader to throw away.

          Regards,
          Adrian

          • 2. Re: HELP! Redeploying webapps - how's it done?
            casanova

            Yep - I know. That's why I stated that the hot deploying is not the problem. I know I can't do it - that's why the webapp is deployed under Tomcat's webapps directory - not as a war file.

            When I make changes to servlets, at this point I have to arrange for JBoss to be stopped and restarted so that the changes will take effect, otherwise if I just FTP up the new class files I get a "Proxy" exception being thrown because the new class file's serial id doesn't match that of the original file. This is why I want to work out how to reload the webapp without stopping and starting JBoss.

            Sorry, I was trying to avoid being long winded originally.

            • 3. Re: HELP! Redeploying webapps - how's it done?

              I'm not sure I understand your problem now.

              I never worked on 2.4.0, certainly with 2.4.3
              you just touched the war file and it redeployed.
              I think for tomcat deployment there is a
              or flag or something like that?
              Does tomcat-3.2.2 have the management app where you
              can do this manually?

              This won't help if you can't reload the servlet class.
              Is that your problem, or is it that the Tomcat's
              classloader is holding/caching an out of date EJB proxy?

              The only possible solution might be to remove the
              webapp, wait and hope the garbage collector unloads the
              class then put the webapp back.
              This isn't any better than restarting jboss. :-(

              Regards,
              Adrian

              • 4. Re: HELP! Redeploying webapps - how's it done?
                casanova

                Your comment:
                "Does tomcat-3.2.2 have the management app where you
                can do this manually?"

                Tell me more! Perhaps I'm looking in the wrong places or phrasing incorrectly, but it seems really difficult to find Tomcat info on redeploying non-war webapps.

                Do you mean to tell me that Catalina has a management console that allows you to redeploy/reload web apps via a browser? If so, this is exactly what I need!

                Thanks,
                Paul.

                • 5. Re: HELP! Redeploying webapps - how's it done?

                  This is from the 4.0 docs, I don't know about 3.2
                  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html

                  Regards,
                  Adrian

                  • 6. Re: HELP! Redeploying webapps - how's it done?
                    icordoba

                    I am replying to this old post to ask what is the simplest way to redeploy/reload a webapp in JBoss 3.2.5
                    When I update jar files, EJBs are reloaded OK, but classes in jars inside WEB-INF/lib dirs of webapps are not.
                    I "touch" web.xml file to get the webapp restarted, but jars are not reloada.

                    Thanks for any help.