4 Replies Latest reply on Oct 15, 2010 3:36 AM by hin D

    JBoss 5.1 redeploy project properly

    Alex K Newbie

      Hello everyone,

       

      I constantly have problems debugging my applications with JBoss AS 5.1.

       

      After redeploying a project with minor changes to one or more JSF pages, JBoss does not display the updated page but seems to be not aware of the changes.

       

      Restarting the server and switching to another browser does not change anything.

      When I deploy the project to a standalone Tomcat server everything works as expected and all changes to the JSF pages are displayed correctly.

       

      I also tried to delete tmp-directory which also does not make any difference.

       

      How can I tell the JBoss AS to really redeploy the project including all changes in all files?

       

      Many thanks in advance!

        • 1. Re: JBoss 5.1 redeploy project properly
          Wolfgang Knauf Master

          How do you deploy? Probably by copying a EAR/WAR file to the deploy directory?

           

          If yes, it might help to delete the previous file first, then wait some seconds until the console log shows an "undeployed" message, and then redeploy the app.

           

          Hope this helps

           

          Wolfgang

          • 2. Re: JBoss 5.1 redeploy project properly
            Alex K Newbie

            Hello Wolfgang,

             

            thanks for the reply!

             

            Actually I already tried this.

             

            How do I redeploy:

             

            Redeploy whole EAR

            1) Just replace ear file with most current one.

            2) delete ear file, wait for undeploy and copy most current one back to deploy folder.

             

            Redeploy only WAR

            1) Just replace war file with most current one.

            2)  delete war file, wait for undeploy and copy most current one back to deploy folder.

             

            Redeploy folder (extracted war but keep .war suffix, e.g. my-project.war)

            1) delete folder, wait for undeploy and copy most current one back to deploy folder.

             

            Other things tried:

            1) Before redeploy, touch all JSP files not only modified ones.

            2) Before redeploy touch also some java-files, so that they are rebuild (using Eclipse).

            3) Before redeploy, touch also web.xml file.

            4) Before redeploy, touch also faces-config.xml.

            5) Do not use nested JSP pages

            ( <f:subview id="id">

            <jsp:include page="nested-page.jsp" />
            </f:subview>

            )

            6) ...

             

            Development environment:

            Current Eclipse EE.

            Standalone JBoss 5.1.0.

              default configuration except of some logging and JPA configurations.

             

            hint: I cannot use JBoss from within Eclipse since my machine is too  slow to startup JBoss within 50 seconds.

            • 3. Re: JBoss 5.1 redeploy project properly
              jim stafford Newbie

              try adding reloadable="true" to the Tomcat configuration in deploy/jbossweb.sar/server.xml Connector

               

              <!-- A HTTP/1.1 Connector on port 8080 -->
                    <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"
                             connectionTimeout="20000" redirectPort="8443"
                             reloadable="true"/>

               

              http://www.jajakarta.org/tomcat/tomcat3.2-4.0/tomcat-3.2.3/doc/uguide/tomcat_ug.html

              A reloadable flag. When developing a servlet it is very                 convenient to have Tomcat reload it upon change, this lets you                  fix bugs and have Tomcat test the new code without the need to                  shutdown and restart. To turn on servlet reloading set the                  reloadable flag to true. Detecting changes however is time                  consuming; moreover, since the new servlets are getting loaded                  in a new class-loader object there are cases where this                  class-reloading trigger casts errors. To avoid these problems                  you can set the reloadable flag to false; this will disable the                  autoreload feature.

              • 4. Re: JBoss 5.1 redeploy project properly
                hin D Newbie

                may be the web cache is working,you can clear the caching and redeploy your project.