1 Reply Latest reply on May 4, 2006 10:49 AM by dimitris

    jboss scheduling

    praveensh

      Hi all,
      I have scheduled to tasks in jboss the first one executes every five seconds and the other executes every 8 seconds.

      In the second task there is an attemt to connect to ftp server which is tried for few user difined times if it fails to connect in the first ateempt. I have thread.sleep(30) seconds betwee each ateemt.

      The problem is when the second is retrying ,the first component which is scheduled to run at every 5 seconds does not come up .

      Can any one tell me what the problem is .

      The first component comes up only when the second component finishes all its retries and comes back. I want to know why this sequentiol behaviour is occuring. please help

        • 1. Re: jboss scheduling
          dimitris

          Because you are using the scheduler thread to execute your ftp tasks, and there is no thread pooling in the scheduler to start the other task.

          One solution is to fork a thead in your code to perform the actual task (but have a flag or something in case it gets delayed no to start another one, if the next scheduling time arrives).

          Another solution is to setup a second scheduler for the 2nd task.