4 Replies Latest reply on Aug 9, 2002 8:24 AM by Andreas Schaefer

    Is a TimerTask in MDB possible.

    Jeroen Vos Newbie

      I have the following problem:

      (I use JBoss 2.4.4)

      I want to make an MDB which does a task every 24 hours automaticaly (the task being a method which sends some messages to another MDB). And the MDB also has to handle incomming messages from other beans all the time.

      Is this possible? If so, in what part of the MDB can I instantiate the TimerTask (which method is called on deployment). I might also want to have only one instance of the bean running, how should I do that? (just by saying the pool should be size 1..... no it couldn't be that simple)

      If not, how should I accomplish this then? What type of bean (if any) is best suited to be a TimerTask? And how do I implement it?

      I hope anybody has any answers on my many questions.