Killing a JavaAction scheduled events

2
Is there a way get the thread ID for a scheduled event so that I might kill it if I suspect it hangs? The only way of doing that now, is to restart a production service.
asked
1 answers
1

It's generally not a good idea to mess with java threads. If you want to stop a program while running, you should build some safeguards in the code which will allow it to stop prematurely. Something along the lines of

for (..iteration clause..) {
  if (shouldStop)
    break;

  .. do the stuff you're trying to do
}

(Assuming it's a list of things you're processing, there are other techniques to achieve the same for other cases)

answered