-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
a daemon thread is just an ordinary thread that has been set as a daemon. their purpose is to be servant threads. when there are only daemon threads left a program will exit.
as such, it executes in the same jvm instance as it's parent.
parent spawns daemon, daemon spawns shell, shell runs command to kill parent which kills daemon which kills shell which kills command.
just a big circle.
i don't know about other OS, but the process control features of the bash shell on linux would allow what i think you are trying to achieve.
don't worry about needing a thread. just try something like
String command = "/where/your/script/lives/scriptname restart& disown"; getRuntime().exec(command);
regards, Kevin
QM wrote: | It just hit me -- | what about a (protected) servlet that spawns a daemon thread, which in | turn calls Runtime.exec( <tomcat stop / start script>)? | | Admittedly, I'm hazy on my Java threading right now, but if that would | work then it's something that's completley within the container, and no | more than a few lines of code. | | -or am I off my rocker? ;) | | -QM | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFApmyuJ7Xd6MyEGu4RAkNEAJ4qwRZp5bln3yilMmONhN9BHlEp4ACfdc8Y lgmuKMq/TdyWn4ECzYNP1iM= =/mzN -----END PGP SIGNATURE-----
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]