2 Replies Latest reply on May 3, 2010 11:09 AM by alrubinger

    ServletMethodExecutor in GlassFish Embedded Container

    alrubinger

      Because GlassFish Embeded runs in-VM, is there a reason we don't use LocalMethodExecutor here in GlassFishEmbeddedContainer.deploy?

       

      try 
            {
               return new ServletMethodExecutor(
                     new URL(
                           "http",
                           "localhost",
                           configuration.getBindPort(), 
                           "/")
                     );
            } 
            catch (Exception e) 
            {
               throw new RuntimeException("Could not create ContianerMethodExecutor", e);
            }

       

      S,

      ALR

        • 1. Re: ServletMethodExecutor in GlassFish Embedded Container
          aslak

          Even if the Container runs in-vm, executing the testcase in 'local' mode does not make the test run inside the container, that only makes it run on the same classpath. Your then not really looking up resources from inside the deployment, but rather as a normal client.  The result might not be exactly the same.

          • 2. Re: ServletMethodExecutor in GlassFish Embedded Container
            alrubinger

            So to repeat myself from IRC (for anyone following along here):

             

            "We can use this as an opportunity to clean up and document as we go."

             

            When I hear "local", and this may just be my EJB background, I think it's in the context of VM/process.  I'm still wondering why GFv3 tests shouldn't be executed as clients, but rather from inside the container, but more confusing is the naming to me.

             

            S,

            ALR