For the most part, it's not a good idea to attempt to consort with threads in a process unrelated to your own. Among other things, they may be running on a seperate CPU, in a separate address space or be in some other way not part of the same universe as your process.
However, a bigger question is "why stop JBoss?" One of the features that JBoss excels at is on-the-fly app updating. In most cases, it's sufficient to simply deploy a new copy of your webapp and JBoss will shut down the old copy and start the new one. And it takes a lot less time than restarting the entire app container.
When it comes to destroying a civilization, gas chambers cannot hold a candle to echo chambers.
posted 11 years ago
Yes, thats very true. I need not restart the JBoss. Anyhow, to make the script wait, I can use this: sleep 10s this will make the script wait for 10 secs where 's' is a suffix to indicate seconds. Thanks.