I have one servlet who is sterted at deploy and in his init() its created main thread which is supposed to run forewer. Her run() method should execute other threads which are created on demand from other class (or servlet). For this other child threads I had created class with schedule tasks (so it is not new thread, but new class in which I put (on creation)various times for executing her tasks).
So, the problem is: I have that other servlet, I have that class with schedule tasks and I have main servlet thread runnig, so, I must put those new classes created on demand in some vector, and put that vector in main run() to execute forewer, and so I can add new classes on demand with new times, and put it in this vector (or, on demand remove from vector, to not execute any more). How?
This is my class Profile with schedule time job: This is my main servlet thread code:
Please help me to create new Profile, put them into Vector for execute