1 2 Previous Next 26 Replies Latest reply on Feb 15, 2015 12:44 PM by itsrahil

    How to set JBoss 7 hot deploy?

    areakbaby

      Hi All,

       

      I use JBoss Developer Studio + JBoss 7,and it work well.

      But I can not understand why JBoss 7 do not hot deploy,I try some method but faild.

       

      method one:

      jboss7\standalone\configuration\standalone.xml

      find
      <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
                 <configuration>
                      <jsp-configuration development="true"/>
                  </configuration>
                  <connector name="http" protocol="HTTP/1.1" socket-binding="http" scheme="http"/>
                  <virtual-server name="default-host" enable-welcome-root="true">
                      <alias name="localhost"/>
                      <alias name="example.com"/>
                  </virtual-server>
      </subsystem>


      add    <configuration>
                      <jsp-configuration development="true"/>
                  </configuration>

      but it is useless.

       

      method two:

       

      For standalone deployment, go to standalone/configuration directory and open standalone.xml. Look for the line below.

              <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">

                  <deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir"                deployment-timeout="60"/>

              </subsystem>

       

      Add this param to enable hot deploy  auto-deploy-exploded="true"

      Changes are as below:

       

              <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">

                  <deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir"                auto-deploy-exploded="true" deployment-timeout="60"/>

              </subsystem>

      when I changed any file the server would restart,this is not I want.

       

      Who hava any idea to make JBoss 7 hot deploy? When change the .jsp or .html files ,then I refresh the browse can see the changes.

        • 1. Re: How to set JBoss 7 hot deploy?
          ctomc

          Hi,

           

          what exact version of jboss 7 do you use?

           

           

           

          --

          tomaz

          • 2. Re: How to set JBoss 7 hot deploy?
            areakbaby

            Hi Tomaz,

             

            It is jboss-as-7.1.1.Final and JBoss Developer Studio is 5.0.0.GA.

             

            Thank you so much.

             

            Areak

            • 3. Re: How to set JBoss 7 hot deploy?
              ctomc

              Hi,

               

              there was a bug in 7.1.1 that coused that development=true attribute was ignored.

               

              if you try with (self build) 7.1.2 or nightly build (7.2.x) it should work.

               

              sorry for inconvinence.

               

               

              --

              tomaz

              • 4. Re: How to set JBoss 7 hot deploy?
                areakbaby

                Thank you Tomaz.

                 

                I changed my strategy and used Maven to make a WAR file.(apache-maven-3.0.4)

                 

                And I found an interesting thing.When I changed the .jsp or .html files it do not hot deploy,but when I changed .java files it works.(Run as Debug on server)

                 

                Unbelievable, because the .java files in the WAR file are just .class files.

                 

                If I use JBoss 7.1.2 just add:

                            <configuration>

                                <jsp-configuration development="true"/>

                            </configuration>

                any other things need to config?

                 

                Thanks.

                 

                Areak

                • 5. Re: How to set JBoss 7 hot deploy?
                  lukasw44

                  This bug is also in Jboss as version 7.1.0 Thunder ??

                   

                  or only in version 7.1.1 ??

                  • 6. Re: How to set JBoss 7 hot deploy?
                    kliczko

                    Has anybody found solution to around this:

                     

                    JBoss 7 configuration is as below:

                            <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">

                                <deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir"                auto-deploy-exploded="true" deployment-timeout="60"/>

                            </subsystem>


                    When I changed any file the server would restart - this is not I want.

                    Is there any way to make JBoss 7 hot deploy *.xhtml, *.jsp and *.html files (when change the .xhtml, .jsp or .html files, then I refresh the browse can see the changes) ?

                    • 7. Re: How to set JBoss 7 hot deploy?
                      kliczko

                      I have found arrounding:

                       

                      1. Set in JBoss configuration: auto-deploy-exploded="false"

                      2. If your exploaded application is named ex. lala.ear (or .war) create in %JBOSS_HOME%/standalone/deployments folder, file: lala.ear.deployed  => thanks of that JBoss deploys exploaded application lala.ear despite configuration attribute auto-deploy-exploded="false" .

                      3. Enjoy hot deployment of: .xhtml, .jsp or .html files in your exploaded application lala.ear

                      • 8. Re: How to set JBoss 7 hot deploy?
                        srigiri

                        Yes Right Artur, Thanks for that 

                        This is what i did...

                         

                        We were having scanner tag in the standalone.xml as below

                         

                        <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" auto-deploy-zipped="false" auto-deploy-exploded="false" deployment-timeout="500"/>


                         

                        When made below change to standalone.xml It didn't worked.

                        <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" auto-deploy-zipped="false"auto-deploy-exploded="false" deployment-timeout="500"/>


                         

                        Then removed "auto-deploy-zipped="false" and made as below

                        <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" auto-deploy-exploded="false" deployment-timeout="500"/>

                        It worked...

                         

                        1 of 1 people found this helpful
                        • 9. Re: How to set JBoss 7 hot deploy?
                          areakbaby

                           

                          In fact when I changed a file like login.jsp ,I found the file login.jsp under jboss-as-7.1.1.Final\standalone\deployments\web***.war  was changed,but can not work.

                           

                          JBoss 4.0, I use ANT copy the login.jsp to jboss-4.0.4.GA\server\default\tmp\deploy\tmp35522***.ear-contents\***-exp.war it works well.

                           

                          It is a bug in JBoss 7.

                          • 10. Re: How to set JBoss 7 hot deploy?
                            srigiri

                            Hi Areak,


                            Adding one more thing to my comments.


                            For getting changes to be reflected without restarting the server the below change to be added (7.x)


                                <subsystem xmlns="urn:jboss:domain:web:1.1" native="false" default-virtual-server="default-host">
                                    <configuration>
                                        <jsp-configuration development="true"/>
                                    </configuration>


                            So the JSP/HTML and all the other static changes will reflect immediately.


                            Regards,

                            Srigiri

                            1 of 1 people found this helpful
                            • 11. Re: How to set JBoss 7 hot deploy?
                              areakbaby

                              Hi Srigiri,

                               

                              I was puzzled. I changed standalone.xml what you said to me,but hot deploy the JSP/HTML failed.

                               

                              My server is  jboss-as-7.1.1.Final and the IDE is JBoss Developer Studio is 5.0.1.GA.

                               

                              what is your IDE? Eclipse? Are there any other need to be set?

                               

                              Thank you so much!

                               

                              Best Regards;

                              Areak

                              • 12. Re: How to set JBoss 7 hot deploy?
                                srigiri

                                Areak,

                                 

                                We are using Eclipse IDE.

                                After using the above said configurations in standalone.xml and keeping the ear and war exploded we are able to achieve this.

                                 

                                If you want i can send the standalone.xml I am using...

                                 

                                Regards,

                                Srigiri

                                • 13. Re: How to set JBoss 7 hot deploy?
                                  areakbaby

                                  Hi Srigiri,

                                   

                                  Please send the standalone.xml to me or you can share to all of us as a attachment.

                                   

                                  My E-mail is:    840378162@qq.com

                                   

                                  Thank you.

                                   

                                  Best Regards;

                                   

                                  Areak

                                  • 14. Re: How to set JBoss 7 hot deploy?
                                    srigiri

                                    Areak.,

                                     

                                    Mailed to 840378162@qq.com

                                     

                                    Please send me your standalone.xml file and just details on the deployment directory structure. So that I can try to analyse your issue.

                                     

                                    Regards,

                                    Sri

                                    1 2 Previous Next