What is the default "org.quartz.threadPool.threadCount" if not specified?

I have scheduled tasks in a Spring application and they have been configured as follows:

<bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <!-- Here the list of tasks --> </list> </property> </bean> 

I am having some problems (some tasks are not performed when they should, but not always, immediately after or at a certain time), and I think that this may be because there are many tasks (so far) (11) system can't run them at the same time. I was thinking about setting org.quartz.threadPool.threadCount like this to increase the number of concurrent threads:

 <bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <!-- Here the list of tasks --> </list> </property> <property name="quartzProperties"> <props> <prop key="org.quartz.threadPool.threadCount">15</prop> </props> </property> </bean> 

But I wonder how many threads were used in the system when I did not set the org.quartz.threadPool.threadCount property? What is the default behavior?

+4
source share
1 answer

When the first open source "SchedulerFactoryBean.java" link ( SchedulerFactoryBean.java ) I was:

 public static final int DEFAULT_THREAD_COUNT = 10; 

This value is used later to set org.quartz.threadPool.threadCount in the initSchedulerFactory method:

 mergedProps.setProperty(PROP_THREAD_COUNT, Integer.toString(DEFAULT_THREAD_COUNT)); 
+6
source

All Articles