tags:

views:

27

answers:

1

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?

+1  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.

vkraemer
Thanks, that's it. I didn't associate the verbose flag with backgrounding, but it makes sense now. Thank you.
jnorris

related questions