dev@glassfish.java.net

Re: Running glassfish in foreground?

From: Mark Basler <Mark.Basler_at_Sun.COM>
Date: Thu, 27 Jul 2006 15:24:44 -0700

Hi Guys,

On Windows, running the default launcher (Java Launcher) with the
--verbose option will only give you the stack dump of the parent
process, which is the admin framework. The jvm doesn't send the signal
to the child processes because of some problem they where having with
javaw. Unix will give the whole stack dump of the parent and child
processes. I filed a bug on the JVM for this problem under bug id
5068433. That is one reason why we coded the native launcher

The original problem of Kohsuke's is only to see the log and end it with
a ctrl-c, so the java launcher will suffice.

To get the full stack trace on windows, you can use the native
launcher. Change the .../glassfish/config/asenv.bat file's native
launcher property to be set to true "set AS_NATIVE_LAUNCHER=true". Then
when you start your domain on widows another command window will popup
while the domain is starting. In this command window named after the
domain, type "CTRL-break" to get the full stack dump.

You can also use a code injection method like
http://tmitevski.users.mcs2.netarray.com/trace.do to get a stack dump on
a running process. I wrote a version of this also, but since it also
uses native code, the native launcher is the easier way.

As stated before, this isn't a problem on unix bases systems.

Hope this helps...

Thanks - Mark



Cheng Fang wrote:

> asadmin start-domain --verbose
> asadmin help start-domain
>
> --verbose By default this flag is set to false. If set
> to true, detailed server startup output is
> displayed. On Windows, press CTRL-Break in
> the domain's
> window to print a thread dump. On UNIX,
> press CTRL-C to kill the server and press
> CTRL-\ to print a thread dump.
>
> Cheng
>
>
>
>
> Kohsuke Kawaguchi wrote:
>
>>
>> Would it be possible to run Glassfish in the foreground (as opposed
>> to work like a daemon, which is what happens when I do "asadmin
>> start-domain")?
>>
>> In other words, I'd like to do the equivalent of "catalina.sh run"
>> with Glassfish. I can see the console that way (presumably where I
>> can configure logs to be sent) and I can kill it simply with Ctrl+C.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>