6 Replies Latest reply on Jul 31, 2007 4:28 AM by samdoyle

    Best Seam Development Environment? (Switch from MC to EJB3)

    -arthur-

      Hi,

      i am developing with seam for almost 3 months now.
      I've switched my project from Spring/Hibernate to Seam/Hibernate and really like it.
      I am currently using Seam 1.2.1GA with Microcontainer and hot deployment to Jetty (with Maven and Eclipse).

      Now i would likte to migrate my project to EJB3 and Jboss AS for learning reasons. (I am student and really interested in Enterprise Web Development - im going to write my diploma about that topic)

      Does anybody have some advices how i can switch my development environment for rapid web development? (I really don't want to restart the container every time i change a *xhtml file)

      Some migration hints for switching my environment from plain Hibernate/MC to JPA EJB3 JBOSS AS would be very useful to me.
      (Currently im developing alone)

      How do you developing your applications with Seam and Eclipse (and maybe Maven)?

      Thank you very much for answers.


        • 1. Re: Best Seam Development Environment? (Switch from MC to EJ
          wise_guybg

           

          I really don't want to restart the container every time i change a *xhtml file


          You should run you application from an exploded folder. For my AuthApplication I have a folder named AuthApplication.ear

          Inside there is META-INF, AuthEJB.jar (exploded folder), AuthWebApp.war (exploded folder) and libraries. Note: There was a thread in this forum that said that the libraries can be moved inside a /lib folder according to the latest specs. This way you can skip declaring them in the web.xml

          With this structure, every modification to a resource file in the AuthWebApp.war folder is applied directly to the application without redeployment.

          Currently I'm using an evaluation copy of IntelliJ IDEA which automatically deploys my application upon server start through a run configuration. The log states:
          [EARDeployer] Init J2EE application: file:/D:/AuthProject/exploded/AuthApplication.ear/


          I think the whole project structure I showed here is guided by IntelliJ. I think it can be moved to Ant/Maven build without a problem.

          • 2. Re: Best Seam Development Environment? (Switch from MC to EJ
            trickyvail

            Yes, running exploded will greatly decrease your build cycle.

            If you are running JBoss 4.0.5.GA please be aware of this bug:
            http://wiki.jboss.org/wiki/Wiki.jsp?page=OutOfMemoryExceptionWhenRedeploying

            • 3. Re: Best Seam Development Environment? (Switch from MC to EJ
              -arthur-

              Which version of Jboss AS do you recommend? I have free choise, because im currently starting to deal with Application Servers. (Should i try 5.0.0Beta2 or is it too unstable?)
              I have worked with Tomcat5.5 before.

              Do you have any tutorial which explains how i can setup my environment?

              The AS brings its own libs (Hibernate, JSF, etc.) There aren't any problems to avoide those libs, rigth? I want to use the newest Hibernte Version and MyFaces 1.2 (JSF 1.2 Implementation) instead of JSF RI. (Beacuse some Tomahawk Componentes are usefull e.g. t:popup)
              I like to manage dependencies on my own, rather than use obsolete libs.

              Thanks in advance

              • 4. Re: Best Seam Development Environment? (Switch from MC to EJ
                trickyvail

                Depends on whether you want to use Seam 1.2.1.GA or 2.0.0.BETA1.

                Seam 1.2.1.GA is the current stable release and works with jboss-4.0.5.GA.

                Seam 2.0.0.BETA1 is the next version of seam and works with jboss-4.2.0.GA (maybe 4.2.1.GA - anyone?).

                I've not run into any problems with Seam 2.0.0.BETA1.

                • 5. Re: Best Seam Development Environment? (Switch from MC to EJ
                  damianharvey

                  The bug referred to by trickyvail also affects 4.2 (and most other J2EE App Servers). It is unavoidable (unless you're using JRockit I think - it doesn't have a PermGen space), but can be mitigated by setting your JVM memory settings as per Chapter 2.1 of the Seam ref.

                  This guy also has a series of useful articles on PermGen that are worth noting:
                  http://www.alessandroribeiro.com/?q=en/node/39, particularly for monitoring.

                  I run in exploded deploy and can also recomend the incremental deploy (your non-Entity, non-SFSB, non-SLSB Beans go into WEB-INF/dev and get picked up by magical classloaders). Means you don't have to unexplode if you make changes to Java code. Read chapt 2.7 of the Seam ref.

                  Cheers,

                  Damian.

                  • 6. Re: Best Seam Development Environment? (Switch from MC to EJ
                    samdoyle

                     

                    "trickyvail" wrote:
                    Yes, running exploded will greatly decrease your build cycle.

                    If you are running JBoss 4.0.5.GA please be aware of this bug:
                    http://wiki.jboss.org/wiki/Wiki.jsp?page=OutOfMemoryExceptionWhenRedeploying


                    Ah I have noticed this on GlassFish V2 as well. I wasn't sure if it was Seam related or not.