9 Replies Latest reply on Jun 7, 2011 11:55 AM by su baochen

    speed up seam development

    Sascha Janz Master

      i am struggling now for quite a while...


      the development cycle of seam, using ear deployment, is really heavyweight


      even jboss server startup time takes often more than a minute.


      i already use the hot deployment feature. but coding things and then try to proof them really takes to long


      are there more hints than hot deployment to get the development cycle fast ?


      i try to use it on a small netbook, but no chance...


      server start up time is ten minutes


        • 1. Re: speed up seam development
          Leo van den berg Master

          Hi,



          I come from a time that development was done on a mainframe, compilation and build took a night, but we made excellent (some still running) software.


          -Start-up takes a minute- is a non-issue / problem.


          If you want to do some serious development, buy some java development compliant hard- and software. Running an IDE and JBOSS on a small netbook is really not very logical, because a netbook is designed to do some chatting, browsing and writing simple texts.


          Leo


           

          • 2. Re: speed up seam development
            Khosro Asgharifard Sharabiani Newbie
            Hi,
            To some extend ,I agree to Sascha.
            We have a app that developed with Seam 2.2.0+JPA+Richfaces and we used JBoss AS 4.2.3.
            After a while we decided to use Hibernate Search 3.1.1 .In order to install it we must use Hibernate
            Annotations 3.4.x, and Hibernate EntityManager 3.4.x.For that we migrated to JBoss 5.1 As.But it takes more time to deploy our app,and we must stop and full publish our app in to JBoss AS when we did add some method to our classes or changing method signature  and some other stuff that are not supported by hot deployment and start it again.
            I am not a .Net developer.But as far as i know .Net developers do not need to use IIS in development.And they use a very lightweight server to develop.But in Java we use the same server as the server that we deploy our app in production except a tuning server configuration.
            In Java,we must know what services start when JBoss AS starts and we must know where they are configured
            in order to disable them ,if our app does not use them,in order to decrease the time that takes JBoss AS to starts.

            Regards.

            Khosro.

            • 3. Re: speed up seam development
              Sascha Janz Master

              ok ok, you are right. good code comes not from good tools or hardware, but from the thing between your ears.


              build time taking a whole night is quite a good training to write good code.


              years ago i wrote code in cenutura, vb, ok no server, but i could really fast proof if my code works.



              tomcat start up takes 1 second on my netbook. jboss 5 takes 10 minutes


              i am convinced there is a way to speed this up.


              may be using jboss embedded or something.



              there must be a solution i think. not for my netbook, but for seam jboss development at all.



              • 4. Re: speed up seam development
                Leo van den berg Master

                Hi,


                It all depends on the application you're developing. Tomcat is for web-only, but if that is enogh, stick to that webcontainer. JBoss contains a lot more functionality, and each service is started. You could trim it, or go for the embedded version. I've seen people do wonders with a simple text-editor and javac in a console or Maven combined with Jetty (very fast and small) !


                I personally don't believe that you could do some serious development on a Netbook, use it a sinoke scratchbook, for pre-designing, notes and pseudo-code, and take that to your desktop for further development/testing.


                If you like it or not, Seam is really not for simple applications, but for the middle to upper range of J2EE development, where you need a DB, JMS and a lot of other services. At the moment I use a neat PC with 4H memory and a 22 inch screen where I can develop, deploy ans test in separate fully opened windows. Can't do that on a 10 inch Netbook.


                Leo

                • 5. Re: speed up seam development
                  Aldo Bonzi Novice

                  You can check your computer configuration to see if anything can be optimized. Here we develop on Core2Duo/2G laptops and JBOSS 5.1 w/ Eclipse starts in 1 minute average.


                  Also, if JBOSS is the problem and you don't see it viable to invest in new hardware you can rent an EC2 instance that suits your needs.

                  • 6. Re: speed up seam development
                    Sascha Janz Master

                    no, really serious development with test etc can t be done on a netbook. at the moment my seleneium tests takes two hours....on my pc at the office.


                    what i ment is to do some simple coding, codereview etc.


                    i use jbpm in my app, so i need to use ejb not just web.


                    but i do not know to use only tomcat for this. or jetty. how can this be done?




                    • 7. Re: speed up seam development
                      Phillip Haines Newbie

                      Sascha, We've had a rather large SaaS seam application running in production for a couple of years. We're using JBoss, Seam, Facelets (including some EJB goodness) in our development/deployment environment.

                      For our development environment to pick up changes to the Java/Scala classes we use a third party product JRebel installed in JBoss - it doesn't pick up 100% of changes (i.e. new method's on EJBs, static member variable require bouncing JBoss (or a full redeploy) which costs around 1min). For facelets we've turned off the facelets.REFRESH_PERIOD so each time we deploy a change to a faclet the changes gets picked up.

                      Each time we make a change we push the changed files into an exploded ear in the deployment directory of Jboss server. This just takes a few seconds.

                      We do all of our development on notebooks (admittedly high end MacsBook's with loads of memory). Another key factor in speeding up development we have found that as long you can load all of your day to day tools IDE, server, email program etc into memory without swapping the rest of the hardware is not as important.

                      So I guess in our experince get enough memory to stop your notebook from swapping and use JRebel to do partial deployments. Hopefully this will help with your development. For us this means seconds for most change - deploy - debug cycles.

                      Good luck with your project... Cheers Phillip
                      • 8. Re: speed up seam development
                        Sascha Janz Master

                        my netbook now has 2 GB RAM, which helped very much, i now can even run jmeter performance tests on it.


                        Further  i agree that tools like JRebel must be used, to get fast development cycle.


                        • 9. Re: speed up seam development
                          su baochen Newbie

                          Hi,


                          JRebel indeed speed up the demployment much more!


                          And, try the more powerful PC, as to cpu, more kernel less jboss startup time. And, get at least 4G memory. My seam2 app has more than 90 DB tables, but jboss start up within one minute. My PC has an AMD 3.0G 4 kenel cpu and 4G memory.


                          Good luck!