9 Replies Latest reply on Jan 29, 2010 11:40 PM by piotr.sobczyk

    Hot deployment classes after debug="false"

    piotr.sobczyk

      Hello, I have a trivial question. What am I supposed to do with classes in hot deployment classloader when I switch to

      debug="false"

      . It seems that I'm getting exceptions like:


      Target Unreachable, identifier 'authenticator' resolved to null



      Until I move my class to main classloader (source directory 'main'). But what when I will want to come back to development and hod deploy my classes again? Will I have to move it to hot deployment source directory again?! Or I overlooked something obvious?

        • 1. Re: Hot deployment classes after debug="false"
          piotr.sobczyk

          So I should just keep seam debug mode activated all the time or keep all the source files in main source directory and stop using hot deployment? What's the correct answer?

          • 2. Re: Hot deployment classes after debug="false"
            kragoth

            I stopped using Hot Deployment a while ago as it seemed to cause more issues then it solved. But, from my understanding you should always be deploying from your main area and then use hot deployment as a debugging tool.


            However, I would recommend getting better info from someone who actually uses this functionality successfully.

            • 3. Re: Hot deployment classes after debug="false"
              piotr.sobczyk

              Thanks, Tim. I guess I will add a targets to build script that copies all the packages from hot deployment source directory to main source directory before production deployment and that copies them back to hot when I'm coming back to development.

              • 4. Re: Hot deployment classes after debug="false"
                piotr.sobczyk

                And how are other people handling this problem. Do you use hot deployment? If so, do you have a special build tool targets that moves components between main and hot areas everytime you want to enable hot deployment/switch to production mode? Or you don't use hot deployment at all? Any hints?

                • 5. Re: Hot deployment classes after debug="false"
                  piotr.sobczyk

                  And how others do to handle this problem? Do you have special build tool target to move Seam components back and forth between main and hot area? Or you don't use hot deployment at all? Any hints/personal experiences?

                  • 6. Re: Hot deployment classes after debug="false"
                    mana.hotmana76.gmail.com

                    Look at Getting started with hot deployment.


                    You can find inspiration in seam-gen generated application, where is in build-dev.properties setting for action.dir property.


                    Anyway hot deployment doesn't work if you have debug=false.

                    • 7. Re: Hot deployment classes after debug="false"
                      piotr.sobczyk

                      Thanks, Marek! Now I see that in Seamgen project switching from debug to production deployment is as simple as changing in build-dev.properties debug to false and action.dir to /WEB-INF/classes.


                      But what with JBoss Tools users? They aren't deploying by build script and can't change such properties. I know that I can drive my JBoss Tools project by Ant Scripts but It's not the best for me, because:
                      1) First I have to create build script by hand from scratch
                      2) I feel very comfortable with deploying application from Servers view

                      • 8. Re: Hot deployment classes after debug="false"
                        mana.hotmana76.gmail.com

                        I am not expert on JBoss Tools, but I know that components.xml by default has got debug set to true.


                        For setting of hot deployment I think that JBoss Tools uses a configuration wizard at the time of creating Seam Web project. After that it can be viewed on Project properties dialog in Java Build Path settings in Source tab, see Output folder for source folder,


                        In case of WAR type of Seam project, Source folder is src/hot and its output is directed to WebContent/WEB-INF/dev. I haven't tried to change this setting so I don't know if it works if you do it.

                        • 9. Re: Hot deployment classes after debug="false"
                          piotr.sobczyk

                          Thanks, Marek. You were right.


                          In order to turn off debug mode in JBoss Tools project you have to:
                          1. set debug=false in components.xml
                          2. go to build path settings from project and change output folder for /src/hot to {project.name}/build/classes


                          In order to turn it on you have to do the opposite (debug=true,set /src/hot output folder {project.name}/WebContents/WEB-INF/dev).