14 Replies Latest reply on Nov 25, 2009 4:58 PM by ekabanov

    How to hot deploy seam project with EAR

    jasonmei

      WAR support hot deploy, but how to hot deploy seam project with EAR?


      thanks!

        • 1. Re: How to hot deploy seam project with EAR

          Please vote for this feature: EJBTHREE-1096

          • 2. Re: How to hot deploy seam project with EAR
            gonorrhea

            b/c it is not a feature that is required by JSR220 or JSR318, most likely JEE vendors will not implement this feature (unless it gives them a good ROI and competitive advantage in the marketplace), but who knows.


            if you are using EJB in your app, then you can run 'ant explode' then 'ant restart' (although I renamed restart to redeploy as it makes more sense...)


            I do that all the time (and ant clean once in a while) so if anybody knows something better using JBDS, holler!

            • 3. Re: How to hot deploy seam project with EAR

              Arbi Sookazian wrote on Apr 04, 2009 00:30:


              b/c it is not a feature that is required by JSR220 or JSR318, most likely JEE vendors will not implement this feature (unless it gives them a good ROI and competitive advantage in the marketplace), but who knows.



              This will eventually be possible, or JEE will die (specially since it is possible if you avoid JEE and use OSGi). I think the latest Glassfish release is OSGi based, so it should be possible to enable this kind of behavior (but I can not find anything related in Google)



              if you are using EJB in your app, then you can run 'ant explode' then 'ant restart' (although I renamed restart to redeploy as it makes more sense...)

              I do that all the time (and ant clean once in a while) so if anybody knows something better using JBDS, holler!

              • 4. Re: How to hot deploy seam project with EAR
                gonorrhea


                This will eventually be possible, or JEE will die (specially since it is possible if you avoid JEE and use OSGi). I think the latest Glassfish release is OSGi based, so it should be possible to enable this kind of behavior (but I can not find anything related in Google)

                it's definitely a productivity issue.  isn't the SpringSource dm server OSGi-based as well?


                so how does it work with Glassfish and Spring 3?  well I guess Spring uses Tomcat so there is no EJB container...

                • 5. Re: How to hot deploy seam project with EAR
                  gonorrhea

                  Do any Seam developers, b/c of this problem, actually develop their projects using only JavaBean Seam components and then convert them to EJB's when the app goes to QA/UAT???


                  Seems like it would be a productivity boost at first but what if you need 2PC/XA, EJB timers, transactions from JTA??


                  what a pain...

                  • 6. Re: How to hot deploy seam project with EAR
                    dan.j.allen

                    When you say hot deploy you have to be more specific. You can definitely work with an exploded EAR to have instance change for assets like Seam page descriptors (pages.xml, .page.xml), JSPs, Facelets templates, JavaScript, CSS, and images. What you cannot do at this time is hot deploy classes without restarting the application (not the application server).


                    So are you looking to be able to hot deploy an Seam session bean component?

                    • 7. Re: How to hot deploy seam project with EAR
                      arshadm

                      I don't think exploded ear works anymore with the latest releases of JBoss because they copy the ear (exploded as well) to the tmp directory before deploying.


                      It was a real nice feature, they should put it back.

                      • 8. Re: How to hot deploy seam project with EAR
                        jasonmei

                        When explode the war project, we can hot deploy seam action, xhtml, *.page.xml, css, etc. we also successfullly prevent the server reload datasource jndi and web.xml through customize the build.xml(not copying datasource jndi xml and web.xml to the server).


                        But in EAR, we cannot hot deploy seam action, even with ant explode. I think it may be the directory structure is not support hot deploy, for I could not find the dev directory.


                        My Question is what is the correct directory structure in EAR to support hot deploy just like WAR. if there is, then we can customize buld.xml to support it.

                        • 9. Re: How to hot deploy seam project with EAR
                          dstockdill

                          Check out Java Rebel.  It gets you a long way towards a fast deploy cycle for EAR. ant explode will automatically enable code changes inside existing classes to be deployed in seconds. it doesn't work for new classes unfortunately so you still need an app restart for that. there's a free trial available on the Java Rebel site.  Would be nice if JBoss/Seam could improve on this.

                          • 10. Re: How to hot deploy seam project with EAR
                            dan.j.allen

                            I've continually heard good things about JavaRebel. Seam's hot deploy of action components is definitely a quick and dirty solution. So I would enough folks to give it a try and see how they like it.


                            Seam's hot deploy is able to handle new components by design though, interestingly enough.

                            • 11. Re: How to hot deploy seam project with EAR
                              dan.j.allen

                              This appears to be a JBoss AS 5 issue, as I have experienced problems with hot deploy there myself. Unfortunately, until that is fixed/changed, there isn't much I can do with the seam-gen project build.

                              • 12. Re: How to hot deploy seam project with EAR
                                dan.j.allen

                                If there are specific changes you want to see in the build.xml, please state what they are, preferably in a JIRA and I will test them and commit them if I find them relevant. Thanks!

                                • 13. Re: How to hot deploy seam project with EAR
                                  alefeltes
                                  • 14. Re: How to hot deploy seam project with EAR
                                    ekabanov

                                    Hi guys, if you want to help get JRebel and Seam working together please sign off here:
                                    JRebelAndSeamIntegration