I use start.jar and stop.jar to stop and start a mooring instance. I restart by calling stop.jar, then start.jar. The problem is that if I haven’t slept long enough between stop.jar and start.jar, I start getting these random ClassNotFoundExceptions, and the application does not work correctly.
Sleeping for a longer period of time between stopping and starting is my current option.
I also heard from someone that I must have something that controls my threads so that I finish them before the pier. It's right? The question that I have about this is that stop.jar returns immediately, so it doesn’t help me if there isn’t something that I don’t see. Another option is to poll the log file, but it's pretty ugly.
What is the best way to restart the pier?
Gilbert: The Ant task is certainly not a bad way to accomplish it. However, he sleeps for a certain amount of time, which I am trying to avoid.
Jeff yang
source
share