本站首页    管理页面    写新日志    退出


«August 2025»
12
3456789
10111213141516
17181920212223
24252627282930
31


公告

戒除浮躁,读好书,交益友


我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:邢红瑞的blog
日志总数:523
评论数量:1142
留言数量:0
访问次数:9695739
建立时间:2004年12月20日




[j2ee]spring中如何使用quartz的低级配置
原创空间,  文章收藏,  软件技术,  电脑与网络

邢红瑞 发表于 2006/9/1 11:54:05

 有时候大家经常用quartz.properties,配置quartz的一些运行参数。例如org.quartz.scheduler.instanceName = DefaultQuartzScheduler org.quartz.scheduler.rmi.export = false org.quartz.scheduler.rmi.proxy = false org.quartz.scheduler.wrapJobExecutionInUserTransaction = false org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount = 1 org.quartz.threadPool.threadPriority = 5 org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true org.quartz.jobStore.misfireThreshold = 60000 org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore但是spring 会自动加载quartz.jar中配置文件大家可以使用SchedulerFactoryBean使用自定义的配置文件<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"><property name="triggers"><list><ref bean="cronTrigger" /><ref bean="simpleTrigger" /></list></property><property name="quartzProperties"><props><prop key="myProperty">myquartz.properties</prop></props></property></bean>或者直接在文件中配置<property name="quartzProperties">   <props>    <prop key="org.quartz.threadPool.threadCount">7</prop>    <prop key="org.quartz.jobStore.driverDelegateClass">     org.quartz.impl.jdbcjobstore.oracle.weblogic.RideOracleDelegate    </prop>    <prop key="org.quartz.jobStore.tablePrefix">BRK_</prop>   </props>  </property>  <property name="autoStartup" value="false" />  <property name="dataSource" ref="${defaultDs}" />  <property name="transactionManager" ref="transactionManager" />  <property name="overwriteExistingJobs" value="true" />


阅读全文(6096) | 回复(0) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.252 second(s), page refreshed 144762886 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号