2 Replies Latest reply on Apr 21, 2011 4:33 AM by Anthony Patricio

    JSFUnit, Questions on hot deployment

    Anthony Patricio Master

      Hi guys,

      we started heavily using JsfUnit (1.3 final) on a Seam 2.2 webapp.

      It really rocks.

      We did some search but didn't find the  way to hot deploy the test classes, being in the war itself or in a custom folder (configuring JsfUnitDeployer).

      So that's the first question, is it possible?

       

      Next, we hit a CL issue related to seam hot deployed classes, whenever we do something like

      MyHotClass myHotClass = (MyHotClass)server.getManagedBeanValue("#{seamconversation.myHotClass}");

      we hit a NoClassDefFoundError.

      If we manually move the seam hotdeployed classes to the *static* classes folder (from WEB-INF/(dev || hot) to WEB-INF/classes) everything work fine. I guess this is more a classloader issue but maybe you already hit the issue.

       

      Last, it seems that the JSFUnit deployer is only able to handle suffixes, hard coded war name defined in the deployer conf doesn't work.

       

      Thanks for your time,

      Anthony

        • 1. JSFUnit, Questions on hot deployment
          Stan Silvert Master

          Well, your two issues are kind-of releated.  The test folder defined in the deployer is indeed different from the WEB-INF/classes folder.  The servlet spec is very specific about how things are loaded from WEB-INF/classes.

           

          I'm guessing here, but you've probably got some kind of issue where a class in WEB-INF/classes refers to a class in WEB-INF/hot.  Then the class in WEB-INF/hot tries to reference back into WEB-INF/classes and you get NCDFE.  That's because the JSFDeployer's classloader can't see into WEB-INF/classes.

           

          As for hot deployment, you would need to redeploy the JSFUnitDeployer.  I don't think that's possible.

           

          As you may know, the JSFUnitDeployer only works on AS5.0.  I know it doesn't work on AS6 and I don't think it's working on AS5.1.  For JSFUnit 2.0, you can use Arquillian and all your hot-deploy problems will be solved.  I'm struggling to get some time to put out another beta, so stay tuned.

           

          Stan

          • 2. JSFUnit, Questions on hot deployment
            Anthony Patricio Master

            That makes sense.

            Thanks for the answer.

             

            Cheers,

            Anthony