[color=blue][align=center][/align]关于QUARTZ 的配置引起了线程起动数和自己配的不一致问题[/color]
前几天做quartz调度任务控制时发现:我配的线程数是1,但真正布上服务器时,发现线程数却起动了好几个,我的本意是每一次只能起动一个.后来查了一下资料发现是我的 quartz.properties文件的其中一项线程池的属性(因为我采用了quartz-1.5.1jar默认配置,线程数配为1):org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true.
改成false就好了:
org.quartz.threadPool.threadCount = 1
org.quartz.threadPool.threadPriority = 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = false
前几天做quartz调度任务控制时发现:我配的线程数是1,但真正布上服务器时,发现线程数却起动了好几个,我的本意是每一次只能起动一个.后来查了一下资料发现是我的 quartz.properties文件的其中一项线程池的属性(因为我采用了quartz-1.5.1jar默认配置,线程数配为1):org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true.
改成false就好了:
org.quartz.threadPool.threadCount = 1
org.quartz.threadPool.threadPriority = 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = false