Henk Hangyi wrote:
> It all works perfect. The only thing which i encounter is that the
> number of threads seems to increase with each time the job is carried
> out. See listing below and notice the WARNING when a new job tries to
> start when the present job is still running. 
> 
> Some questions:
> -Does the counter in the warnings give the correct number of threads
> running?
> -If yes, is it something to worry about? Will the used threads stop by
> themselves or do i have to add some code to the run() method?
> -Is it something which is solved in newer versions of the crontab module
> and how stable is the present version?

The present version (offered in the current hack) does not require for you
to do your own thread stuff, so you can't do something wrong with that.

You run() method for the rontab module could look now like this:

public void run() {
  readXML();
}

Which is quite a lot simpler.

Btw, a thread is still started for a job, unless you explicitely state that
it should (e.g. if your job is very short-living, and often executed). It
will not start a thread if the previous one is still running (unless
specified otherwise).

I'm not sure what's going wrong in your case,  but I suggest updating to the
currently offered mmbase-crontab.jar, and change the implementation as
above.



Michiel




-- 
Michiel Meeuwissen                  mihxil'
Mediacentrum 140 H'sum                [] ()
+31 (0)35 6772979         nl_NL eo_XX en_US




Reply via email to