4 Replies Latest reply on Apr 21, 2010 12:44 AM by swd847

    Hot deployment for EAR modules

    swd847

      I have just release version 0.1 of a project which should allow you to hot deploy seam components in an ear.


      http://code.google.com/p/fakereplace/


      To use it just start the JVM with the following parameters


      -javaagent:/path/to/fakereplace/fakereplace.jar -Dorg.fakereplace.packages=com.mycompany
      
      



      And you should be able to replace all classes in all packages under com.mycompany.


      If anyone finds any bugs please report them in the issue tracker.


        • 1. Re: Hot deployment for EAR modules
          swd847

          I just released version 0.2, which should contain some bug fixes for the seam integration.


          • 2. Re: Hot deployment for EAR modules
            xsalefter.xsalefter.yahoo.com

            Hi Douglas.. That was a great job. But why you don't post something like this in other popular place, like in-relation-to or others..? At least people made a aggregator to them.


            Thanks.

            • 3. Re: Hot deployment for EAR modules
              jeanluc

              Hi Stuart,


              It might be helpful to explain what's different with this approach compared to hotswap so users know when to use each.


              Cheers,
              -jl

              • 4. Re: Hot deployment for EAR modules
                swd847

                The approach recompiles your classes on the fly as they are loaded into the JVM to allow them to be replaced later.


                - Compared to hotswap


                Hotswap only allows you to replace method bodies. Fakreplace can allow you to replace much more, including methods, fields and annotations. It does not however allow you to change superclasses or interfaces.


                - Compared to app server hot deploy


                It is much faster than an application server hot deploy, as it only replaces the modified classes and does not totally re-initialise the application. However an app server hot deploy allows you to change everything about your class including superclasses / interfaces.



                This is still all fairly experimental, and is probably a similar approach to how JRebel / Weblogic fast swap work, however I have not used either of these so I am not sure.