quality@glassfish.java.net

Re: Programatically control glassfish?

From: Carla Mott <Carla.Mott_at_Sun.COM>
Date: Mon, 19 Jun 2006 17:09:09 -0700

Just curious why you decide to write a test harness vs using
TestNG or Junit both are used by GlassFish. Is there missing
functionality?

Carla

Kohsuke Kawaguchi wrote:

> Binod wrote:
>
>> Hi Koshuke,
>>
>> What is the usecase you are looking at for starting and stopping GF
>> in an
>> existing JVM? Are you planning to start any product or application that
>> is deployed into AS and hide "the server" behind it? Or are there some
>> specific services of the appserver that need to be used in your app?
>
>
> I'm writing a test harness for the Tango project. One of the goals
> there is to test the Tango components in different environments, and
> this includes Glassfish.
>
> So I'd like my test harness to be able to start Glassfish, run tests
> (which includes deploying web applications), and stop it. I can live
> with Glassfish being an external process, but it's preferable for
> Glassfish to also run in the same VM because ...
>
> 1) when a developer kills a test by Ctrl+C, it won't leave
> a Glassfish process running (which breaks successive runs.)
> 2) a developer can use a single debug session to set breakpoints
> to both clients and servers.
> 3) all console outputs appear in single PrintStream, and therefore
> it's easier to capture.
>
> Also, my experience with Tomcat says talking to the container
> in-process is generally easier and more reliable than doing so
> externally. For example, when something fails inside the container, I
> can see the whole stack trace where it failed.
>
>