• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

put Vector in run(), and update him

 
Marko Debac
Ranch Hand
Posts: 121
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hallo to all,

I have a burdensome problem:

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

regardes,
Marko
 
Marko Debac
Ranch Hand
Posts: 121
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe with HttpSessionAttributeListener:

every time when I call function from somewhere, like and put in Listener
and in running servlet

every time when I call function() with diferent parameters, I will add new Profile in Vector, to execute new task with diferent id for (every) diferent time, or not?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic