I would like to create a worker thread that should be shared within other sessions. Basically I want to restrict other users from doing the same process. So They will retrieve the thread via a static Instance of object thread that I created. If the thread is still alive, then they will be prompted with error.
Is there a other way to do this because I am thinking if placing a Thread object within a static is safe? I am also thinking of application context but I am not sure which is better way to do this in java?