How to launch Glassfish v3 without backgrounding

Posted by jnorris on Stack Overflow See other posts from Stack Overflow or by jnorris
Published on 2010-04-23T07:23:30Z Indexed on 2010/04/23 13:53 UTC
Read the original article Hit count: 229

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about glassfish

Related posts about daemontools