Q:

How to launch Glassfish v3 without backgrounding

Glassfish v3 is launched as follows:
./bin/asadmin start-domain <domain-name>

This script eventually runs:
exec "$JAVA" -jar "$AS_INSTALL_LIB/admin-cli.jar" "$@"

admin-cli.jar eventually launches another process, effectively putting itself into the background. 
I would like to launch glassfish without putting itself in the background for the purpose of monitoring with daemontools (ie: svc).   Is this possible? 
The documentation talks about using inittab here which seems like it would also require a way to launch it without forking or backgrounding so some other process (eg: inittab, evc, etc.)  can watch the process id and restart it if it crashes.   However, in this inittab example, is it using the same backgrounding cmd line, so I don't know how inittab can possibly respawn the process when it doesn't know what process id to watch.   Am I missing something? 

A:

You should be able to use asadmin start-domain -v...
Note: log statements are sent to the log file AND System.out/System.err.