1 2 Previous Next 29 Replies Latest reply on Aug 7, 2008 10:27 PM by sjmenden Go to original post
      • 15. Re: HOWTO - Run bookings example from Eclipse
        sjmenden

        I am already using it (JBossTools 2.1.2) and do like it a lot, but not for its performance. I guess it depends on you machine, currently I am using a Core 2 Duo at 1.8 Ghz with 4Gbyets the RAM on Windows XP SP2 32-bit (so I can not take advantage of the 64bits of my processor and it only uses 3Gbytes, and, WAR takes between 25 and 30 secs to start (cold start). Hot-deploys do feel faster (around 3 to 4 secs) but the sad thing is that any changes to the entities prevent you from using hot deploy.

        WARs take 5 seconds to cold start on my machine, but I think we are getting our terms mixed up.  Btw, I'm on a T60, so similar specs to yours but a bit less.   So are you talking about the time to start JBoss + the WAR, or purely the time to start the WAR?  It should not be anywhere near 30 seconds to deploy the WAR file, but yes, it does take up to 30 seconds to start JBoss and get everything going, but that is a one time deal when starting JBDS.




        That has not been my experience... the only way I know to do a a full re-hot-deploy is to "touch" web.xml (by writing a whitespace and then delete it, which is akward, I really wish somebody added a button for full re-hot-deploy ). Anyway, this "touch" web.xml takes around 15 to 20 seconds. (I still wonder, why Eclipse WTP doesn't have an easy start/stop button just for the application, not the whole app server, it would be nice featur to add to JBossTools)


        There is a button!  So open the JBoss Server View expand modules and you'll see your webapp there, right click on your webapp and click Full Publish this is identical to a full deploy, and takes ~5 seconds.


        So whenever you add/change an entity, right click on the webapp, full publish, wait a few seconds, and you are ready to go again.

        • 16. Re: HOWTO - Run bookings example from Eclipse
          admin.admin.email.tld

          This is a very important topic as it affects Seam developers dev/test cycles on a daily basis.


          Check this out from the Seam ref doc:



          Because we've added a new Seam component, we need to restart the exploded directory deployment. You can
          do this by typing seam restart, or by running the restart target in the generated project build.xml file from
          inside Eclipse. Another way to force a restart is to edit the file resources/META-INF/application.xml in Eclipse.
          Note that you do not need to restart JBoss each time you change the application.

          So let's say we make a change to an existing session bean and save and ant explode.  If we then execute seam restart are we good to go as long as the JBOss AS was already running?


          And how different is seam restart from full publish?

          • 17. Re: HOWTO - Run bookings example from Eclipse

            Arbi Sookazian wrote on Aug 07, 2008 16:09:


            This is a very important topic as it affects Seam developers dev/test cycles on a daily basis.

            Check this out from the Seam ref doc:



            Because we've added a new Seam component, we need to restart the exploded directory deployment. You can
            do this by typing seam restart, or by running the restart target in the generated project build.xml file from
            inside Eclipse.



            Yes, but what happends if one is using a JBossTools project instead of plain Ant?



            Another way to force a restart is to edit the file resources/META-INF/application.xml in Eclipse.



            And another way (if you project is a WAR) is to edit the web.xml.  I wonder, why there isn't a button for this? A reload application button... It could even be a general purpose touch file button, but even then it would feel less ankward than having to open, do a dummy change, and then resave a file)




            Note that you do not need to restart JBoss each time you change the application.



            But note too, that we are not going to make it any easier for you to deal with this ;-) . Not from inside Eclipse.






            So let's say we make a change to an existing session bean and save and ant explode.  If we then execute seam restart are we good to go as long as the JBOss AS was already running?



            IMO it should work. But I don't know if seam restart is enough if you made changes to an @Entity. Also I have found that hot reloads some times silently fail, and, after this failurs have hurt you (damn why it is still failing after I fixed it! Oh, it is because it didn't detect my change! Damn I wasted 2 hours on this) you start prefering cold restarts




            And how different is seam restart from full publish?


            If by full publish you are referring to the option in the WTP Servers window, in my experience that full publish is.. well.. good for nothing. (I do wonder however why it is there if it seems to do nothing).

            • 18. Re: HOWTO - Run bookings example from Eclipse
              sjmenden

              So let's say we make a change to an existing session bean and save and ant explode. If we then execute seam restart are we good to go as long as the JBOss AS was already running?

              And how different is seam restart from full publish?

              Same, a seam restart 'ant restart' copies over any changed files and touches the web or application.xml, forget which, which causes the EAR/WAR to redeploy.



              The full publish does the same, causes the EAR/WAR to do a redploy.  And yes, as long as you keep JBoss running, just 'seam restart' if you change an EJB3.

              • 19. Re: HOWTO - Run bookings example from Eclipse
                sjmenden

                If by full publish you are referring to the option in the WTP Servers window, in my experience that full publish is.. well.. good for nothing. (I do wonder however why it is there if it seems to do nothing).

                This is not true, go to modules find your webapp, right click, click Full Publish and it causes a redeploy of the application.  This function is synonymous with 'ant restart' in a seam gen project.


                What version of JBossTools did you experience the Full Publish not working on?

                • 20. Re: HOWTO - Run bookings example from Eclipse

                  Samuel Mendenhall wrote on Aug 07, 2008 15:13:


                  WARs take 5 seconds to cold start on my machine, but I think we are getting our terms mixed up.  Btw, I'm on a T60, so similar specs to yours but a bit less.   So are you talking about the time to start JBoss + the WAR, or purely the time to start the WAR?  It should not be anywhere near 30 seconds to deploy the WAR file, but yes, it does take up to 30 seconds to start JBoss and get everything going, but that is a one time deal when starting JBDS.


                  By cold start I mean fully re-starting the AppServer and the WAR/EAR



                  There is a button!  So open the JBoss Server View expand modules and you'll see your webapp there, right click on your webapp and click Full Publish this is identical to a full deploy, and takes ~5 seconds.

                  So whenever you add/change an entity, right click on the webapp, full publish, wait a few seconds, and you are ready to go again.



                  I vaguely remember trying this and getting no noticeable effect,  but maybe I am confusing it with the publish option in the WTP server window. I'll give it a shot, but doubt it will be as fast as using Tomcat.





                  All this Application Server development is funny... it is like going back to 16-bit Windows (remember, back then, if a single application crashed, everything went down with it). It is the same with this modern application servers, if one application goes crazy (infinite loop, very long and slow process, memory leak, etc), it will take down the application server, and there is no way around that that I know of (Same thing wih Eclipse, if one plug-in goes crazy, everything goes down) it is funny (and sad at the same time) because so much time and resources were wasted trying to give processes proper isolation at the OS level, and now we are using technologies that make that effort irrelevant.


                  Even if the full publish option works as advertised, I still find it counter-intuitive, there should be publish application files, stop application, start application and restart application buttons (some times when debugging/testing something one just wants to start over, because something corrupted, but without any changes).


                  It may also be useless if a particular application crashes with an error that takes down the application server. For those cases (that sadly in my experience, when starting development of a new system happen a lot, specially with newbie developers) it should be possible to both restart only an application (if that is even possible without proper OS-level process isolation) or to cold restart the app server really fast.


                  Regards,

                  • 21. Re: HOWTO - Run bookings example from Eclipse

                    I was refering to the publish option in WTP, not the JBossTools specific Full Publish (my mistak) in but, what about real restart needed problems

                    • 22. Re: HOWTO - Run bookings example from Eclipse

                      Sorry, I was meaning to poin to this post.

                      • 23. Re: HOWTO - Run bookings example from Eclipse
                        sjmenden

                        Yeah, not sure about the WTP specific publish command.  When I try it out, a dialog comes up that says publishing, but that is it, no re-deploy of any webapps, so I assume it purely copies over any changed files, which is pointless to do manually since it is done automatically.  I always just use the JBoss Server View specific Full Publish, and I override the Automatic publishing to 1 second, the default of 2 is too long for me personally.


                        I also assume, the WTP command is there if one wants to turn off automatic publishing and publish manually.

                        • 24. Re: HOWTO - Run bookings example from Eclipse

                          Yes, but what do you do when you actually need to restart without copying stuff?

                          • 25. Re: HOWTO - Run bookings example from Eclipse
                            sjmenden

                            Unless I'm missing more of the use case you are talking about, you just click the stop button then the start button in the JBoss Server View.   This is rarely needed as you can remove webapps and redeploy them within the view also, thus removing the need to stop/restart the container.

                            • 26. Re: HOWTO - Run bookings example from Eclipse

                              Samuel Mendenhall wrote on Aug 07, 2008 18:59:


                              Unless I'm missing more of the use case you are talking about, you just click the stop button then the start button in the JBoss Server View.



                              But, that restarts all the application server! how can I restart just one application?


                              This is rarely needed as you can remove webapps and redeploy them within the view also, thus removing the need to stop/restart the container.


                              But, isn't that much slower? one needs to delete and then re-copy every file in project in to the App Server.. Why do that if only a restart is needed? (and, if it is not doing that... why use a counter-intuitive name such as remove/redeploy?)

                              • 27. Re: HOWTO - Run bookings example from Eclipse
                                sjmenden

                                Ok, I think we are mixing up terms here.


                                Let's go back to the basics.



                                • You don't need to restart JBoss to redeploy a webapp

                                • When using an EAR project and making a change to an EJB3 or adding an Entity you need to right click on the ear in the modules and click Full Publish.  This touches the application.xml and causes a redeploy without needing to restart

                                • When using an EAR project and making a change to an xhtml or any pages xml, just save and it is copied automatically.

                                • Whenever you save any changes you'll see Publishing in the status of the server, this means it is copying the changes over automatically as defined in the Automatic Publishing settings.  Publishing just means copying over changes.

                                • When using a WAR project all Seam JavaBeans are hot-deployable, this means create or change any existing JavaBean, save, wait for the automatic publish to happen, refresh your page

                                • Per above, this is not the same as a Full Publish which touches the web.xml and causes a re-deploy, no restart required.





                                one needs to delete and then re-copy every file in project in to the App Server


                                Why is this necessary?




                                Why do that if only a restart is needed?

                                A restart isn't needed and takes unecessary time, just touch the web.xml or application.xml to cause a hot-deploy.  http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.3.0.cp01/html-single/Server_Configuration_Guide/index.html#Deployment  -- JBoss AS constantly scans the deploy directory to pick up new applications or any changes to existing applications. So, you can hot deploy application on the fly while JBoss AS is still running.



                                The only reason I said This is rarely needed as you can remove webapps and redeploy them within the view also, thus removing the need to stop/restart the container.   was because I think I was reading a wrong section of one of your posts, lol, and I was thinking you thought it was necessary, forgive my lapse :)

                                • 28. Re: HOWTO - Run bookings example from Eclipse

                                  Interesting...JDBS seems more capable than I thought, just a few more questions:



                                  Samuel Mendenhall wrote on Aug 07, 2008 20:32:


                                  Ok, I think we are mixing up terms here.

                                  Let's go back to the basics.


                                  • You don't need to restart JBoss to redeploy a webapp




                                  Unless it crashed because of an infinite loop, memory leak, etc, etc. Am I right?



                                  • When using an EAR project and making a change to an EJB3 or adding an Entity you need to right click on the ear in the modules and click Full Publish.  This touches the application.xml and causes a redeploy without needing to restart




                                  And.. this works even if I made absolutely no change to the application code, and I just want to reset it to its initial state?



                                  • When using an EAR project and making a change to an xhtml or any pages xml, just save and it is copied automatically.




                                  Agreed, already know that.



                                  • Whenever you save any changes you'll see Publishing in the status of the server, this means it is copying the changes over automatically as defined in the Automatic Publishing settings.  Publishing just means copying over changes.




                                  Okey, thank, I have always wondered what was the real purpose of Publishing  (really, I use to believe it was only for publishing xhtml stuff, not java stuff)



                                  • When using a WAR project all Seam JavaBeans are hot-deployable, this means create or change any existing JavaBean, save, wait for the automatic publish to happen, refresh your page




                                  But that does not include @Entity classes... they can not be hot deployed, they need an application restart (but not a JBoss restart).To restart the application I can use the full publish option. Am I right?



                                  • Per above, this is not the same as a Full Publish which touches the web.xml and causes a re-deploy, no restart required.






                                  I just (still) feel that full publish is not an intuitive name for application restart, I think an option with that particular name should be added for clarity.


                                  Thanks for taking the time for answering all of this.

                                  • 29. Re: HOWTO - Run bookings example from Eclipse
                                    sjmenden

                                    Absolutely, glad to shed some positive light on JBDS.  I do agree that the "Full Publish" is not as intuitive as something like "Re-Deploy", but, once you learn the distinction it becomes a second nature.

                                    1 2 Previous Next