Thanks for checking out Seam Cron, and for this interesting test case. What has happened is you have run into the maximum thread-pool size limit of 4 which is currently hard-coded into the Quartz scheduling Seam Cron implementation. Once the first four jobs are submitted no more can proceed until the first one finishes. Note that the next four jobs also fill up the thread pool in a similar fashion (as evidenced by the 8-second gap at :21 to :29). I have verified this theory locally using your test code.
I have created this jira to make things like thread-pool size configurable by the end developer.
Thank you, Pete. It'll be very nice if the pool size is configurable.
Before the ticket in jira is fixed, is there any walk around?
I have just increased the hard-coded number from 4 to 100, so you could build from source to replace the version in your machine's local repository:
git clone git://github.com/seam/cron.git cd cron mvn clean install
That's about the best thing I can think of to tide you over until the problem is fixed and Alpha2 is released.
That really helps.
Thanks for setting the hard-coded number from 4 to 10.
But I found that one more place may need to be udpated.
It's QuartzAsynchronousProvider.class. In this class, the thread pool size is also hard coded to 4.