12 Replies Latest reply on Oct 21, 2009 12:24 AM by Stuart Douglas

    Seam hot deploy is ... not good

    lance stine Newbie

      Well, I hate to be negative but I really can't see anything good that the hot deploy does for me. I am still a Seam enthusiast but I am looking for a way to turn hot deploy off. There isn't anything out there that I can see yet. I'm considering removing it from the jar and replacing it with the old deployer. Has anyone tried anything like this?

        • 1. Re: Seam hot deploy is ... not good
          lance stine Newbie

          It didn't work. I guess the only thing to do is use older versions.

          • 2. Re: Seam hot deploy is ... not good
            blabno Master

            Hot deploy is one of the best features of Seam. It works only with WAR, but still it saves time. Reloading entire application when I have changed one line in action bean is too time consuming.

            • 3. Re: Seam hot deploy is ... not good
              Elmar Weber Newbie

              Bernard Labno wrote on Sep 23, 2009 04:11:


              [...]It works only with WAR, but still it saves time. [...]


              That had bugged me as well. Since then I usually start my development server in debug mode and connect to it from the IDE. This way any minor code change, i.e. not adding / removing fields or methods, is taken directly into the App. The slowdown by using debug mode on todays CPUs is barely noticeable on a development system.

              • 4. Re: Seam hot deploy is ... not good
                B Tomic Newbie

                ...I usually start my development server in debug mode and connect to it from the IDE.


                Terribly sorry for diverging from the topic, but would you please explain how is this done? I'm sure I am asking for something obvious here, but I don't know how to start JBoss in debug mode and use Eclipse for debugging...

                • 6. Re: Seam hot deploy is ... not good
                  Damian Harvey Apprentice

                  I'm also curious as to how/why hot deploy is not good? You'd have to be mad to turn it off.


                  In any regard setting debug to false in your components.xml will be enough to disable it. Read the manual


                  Cheers,


                  Damian.

                  • 7. Re: Seam hot deploy is ... not good
                    B Tomic Newbie

                    Bernard Labno wrote on Sep 23, 2009 11:06:


                    Read this : Configuring Eclipse for Remote Debugging



                    Thanks a lot!

                    • 8. Re: Seam hot deploy is ... not good
                      lance stine Newbie

                      Damian,


                      To answer your question of why hot deploy is bad for me, it just doesn't do anything time saving for me.


                      In my current IDE configuration when I upgraded to Seam 2.1.x and explode an application I lost the ability to save pages and keep the session alive. If I save anything in the WAR be it css, javascript, or facelets pages then I have to do page clicks and fill out form data to see the change. This is especially a terrible waste of time when it comes to css or making PDF pages becuase they usually require constant tweaking to get right.


                      In terms of the EAR, I have been doing test driven development with the amazing TestNG. So when I make a change to my java code I run my test suite to see if it works. The hot deploy provides no advantage there. I don't want to start clicking the mouse and filling out forms to see if the code works unless I have to.


                      Maybe my IDE is messed up. All I know is that with Seam 2.0.1 development was a breeze. With 2.1.x it is kind of annoying.

                      • 9. Re: Seam hot deploy is ... not good
                        Damian Harvey Apprentice

                        Do you lose the session or just the conversation? Hot Deploy won't keep the conversation alive but it shouldn't interfere with the session.


                        Regarding the CSS, assuming you use Firebug then much of your tweaking can be done in the browser.


                        I don't know about you, but I always find that I have some logic in the backing beans for a page (rather than an EJB that can be easily unit tested) that need tweaking and hot deploy helps a great deal here.


                        Cheers,


                        Damian.

                        • 10. Re: Seam hot deploy is ... not good
                          lance stine Newbie

                          The session is what dies. All of the EJB and Seam components are unavailable. Losing the conversation is just as bad. The older versions of Seam kept the conversation. I could tweak any way I liked and see the results by refreshing the web page.


                          If I save anything in my application then the hot deployer does its thing and then I get an error like below: I have to explode again to fix it.


                          Caused by: javax.ejb.NoSuchEJBException: Could not find stateful bean: 5c4o33m-ob1kgj-fzzq2wm1-1-fzzqu4ii-11
                               at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:390)
                               at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:375)
                               at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                               at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                               at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                               at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:206)
                               at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:119)
                               at $Proxy261.getDeptId(Unknown Source)
                               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:585)
                               at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
                               at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                               at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
                               at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                               at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43)
                               at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                               at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
                               at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                               at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                               at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
                               at org.javassist.tmp.java.lang.Object$$javassist5.getDeptId(Object$$javassist5.java)
                               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:585)
                               at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
                               at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
                               at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
                               at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
                               at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
                               at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                               at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                               ... 51 more

                          • 11. Re: Seam hot deploy is ... not good
                            lance stine Newbie

                            Even though it only seems negative, I wanted to add some more feedback on why the new hot deployer is not good. Maybe someone will read it and agree and get it fixed.


                            The number one problem is that it redeploys when any file of any type at all is saved. Say you are running integration tests and are reading verbose output then see that you need to change the suite-of-Test.xml file, I will redeploy and overwrite the console output. That is kind of annoying. The same thing happens when you change the import-dev.sql script. It even redpolys if you change a configuration file in the bootstrap folder.


                            This and all of the other things that I have mentioned are really annoying. I have reverted to use Seam 2.0.1.GA. It's deployer works.

                            • 12. Re: Seam hot deploy is ... not good
                              Stuart Douglas Master

                              I use a simple hot deploy filter I created that is available here.


                              It only allows you to change method bodies, but it works instantly and I find it saves a lot of time, and as I use EAR's I don't have the option of using seam hot deploy.