This content has been marked as final.
Show 2 replies
-
1. Re: Remote EJB lookup and Invocation and Thread.interrupt() issues
nephri Apr 7, 2017 8:14 AM (in response to nephri)No body have any info about theses issues ?
-
2. Re: Remote EJB lookup and Invocation and Thread.interrupt() issues
dmlloyd Apr 7, 2017 8:53 AM (in response to nephri)To interrupt a thread means "stop whatever you're doing, for some reason". So everything that might block will be stopped as long as the thread is interrupted. If you don't want that to happen then you should not use interruption as a way to wake up a thread with a time delay.
A better solution for your use case is to use Object.wait()/Object.notify*() instead. Or maybe a higher level construct like ReentrantLock, CountDownLatch, or Semaphore. All of these things wake up a thread without interrupting it.