atom feed22 messages in net.java.dev.glassfish.devRe: Running glassfish in foreground?
FromSent OnAttachments
Kohsuke KawaguchiJul 27, 2006 2:08 pm 
Scott OaksJul 27, 2006 2:14 pm 
Cheng FangJul 27, 2006 2:17 pm 
Jan LueheJul 27, 2006 2:21 pm 
Sreenivas MunnangiJul 27, 2006 3:11 pm 
Mark BaslerJul 27, 2006 3:24 pm 
Jan LueheJul 27, 2006 3:30 pm 
Mark BaslerJul 27, 2006 3:30 pm 
Kohsuke KawaguchiJul 27, 2006 3:36 pm 
Mark BaslerJul 27, 2006 3:38 pm 
Kohsuke KawaguchiJul 27, 2006 4:31 pm 
Mark BaslerJul 27, 2006 4:36 pm 
Kedar MhaswadeJul 27, 2006 4:38 pm 
Byron NevinsJul 27, 2006 4:54 pm 
Jim DriscollJul 28, 2006 8:35 am 
Sameer TyagiJul 28, 2006 11:59 am 
Kedar MhaswadeJul 28, 2006 12:22 pm 
Jan LueheFeb 13, 2009 1:48 pm 
Jeanfrancois ArcandFeb 13, 2009 1:54 pm 
Hong ZhangFeb 14, 2009 10:22 am 
Wolfram RittmeyerFeb 15, 2009 5:36 am 
Rajiv MordaniFeb 17, 2009 10:42 am 
Subject:Re: Running glassfish in foreground?
From:Mark Basler (Mark@Sun.COM)
Date:Jul 27, 2006 3:24:44 pm
List:net.java.dev.glassfish.dev

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.

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.