spring的quartz配置
<bean id="sendJobDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="smsService"/>
<property name="targetMethod" value="sendAllUnsentMessage"/>
</bean>
<bean id="monitorJobDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="smsClientMonitor"/>
<property name="targetMethod" value="monitor"/>
</bean>
<bean id="sendTrigger"
class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail" ref="sendJobDetail"/>
<property name="startDelay" value="${sendTrigger.startDelay}"/>
<property name="repeatInterval" value="${sendTrigger.repeatInterval}"/>
</bean>
<bean id="monitorTrigger"
class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="monitorJobDetail"/>
<property name="cronExpression"
value="${monitorTrigger.cronExpression}"/>
</bean>
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="sendTrigger"/>
<ref bean="monitorTrigger"/>
</list>
</property>
</bean>
posted on 2006-11-17 11:12
Java初心 阅读(400)
评论(0) 编辑 收藏 所属分类:
Spring