我的評(píng)論
re: 給我離開(kāi)的勇氣!!! boddi 2008-10-07 17:18
是的,謝謝
re: Spring Quartz如何動(dòng)態(tài)配置時(shí)間(3) boddi 2007-08-11 14:56
thrank you!
是這樣的,客戶(hù)有個(gè)需求是可以自己修改任務(wù)的間隔時(shí)間的!(這個(gè)值是設(shè)置到數(shù)據(jù)庫(kù)中的),因?yàn)镾impleTriggerBean必須設(shè)置repeatInterval屬性,而這個(gè)值因?yàn)槭潜4嬖跀?shù)據(jù)中的,所以我想設(shè)置兩個(gè)定時(shí)任務(wù)CMSTransformCRMTrigger和ScheduleInfoActionTrigger,ScheduleInfoActionTrigger在CMSTransformCRMTrigger任務(wù)執(zhí)行前觸發(fā):其目的是為CMSTransformCRMTrigger根據(jù)數(shù)據(jù)庫(kù)的值設(shè)置其repeatInterval屬性,配置文件如下:
<bean id="CMSTransformCRMEngine" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource">
<bean class="org.springframework.aop.target.SingletonTargetSource">
<constructor-arg>
<bean class="com.server.business.cms.CMSTransformCRMEngine"/>
</constructor-arg>
</bean>
</property>
<property name="interceptorNames">
<list>
<value>CallContextInterceptor</value>
</list>
</property>
</bean>
<bean id="CMSTransformCRMJob" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass">
<value>com.wisecrm.server.business.cms.CMSTransformCRMScheduledTask</value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="cmsTranCRMEnginer">
<ref bean="CMSTransformCRMEngine"></ref>
</entry>
</map>
</property>
</bean>
<bean id="CMSTransformCRMTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail">
<ref bean="CMSTransformCRMJob"></ref>
</property>
<property name="startDelay">
<value>90000</value>
</property>
<property name="repeatInterval">
<value>90000</value>
</property>
</bean>
<bean id="ScheduleInfoAction" class="com.wisecrm.server.business.cms.ScheduleInfoAction">
<property name="dataSource" ref="DataSource"/>
<property name="scheduler" ref="schedulerFactory"/>
</bean>
<bean id="ScheduleInfoActionFactory" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="ScheduleInfoAction"/>
<property name="targetMethod">
<value>setTaskTimeByPreference</value>
</property>
<!--property name="arguments">
<list>
<ref local="DataSource"/>
<ref local="schedulerFactory"/>
</list>
</property-->
<property name="concurrent" value="false"/>
</bean>
<bean id="ScheduleInfoActionTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail">
<ref bean="ScheduleInfoActionFactory"></ref>
</property>
<property name="startDelay">
<value>80000</value>
</property>
<property name="repeatInterval">
<value>50000</value>
</property>
</bean>
<bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="CMSTransformCRMTrigger"/>
<ref local="ScheduleInfoActionTrigger"/>
</list>
</property>
</bean>
ScheduleInfoAction是動(dòng)態(tài)設(shè)置間隔時(shí)間的接口:
是這樣的,客戶(hù)有個(gè)需求是可以自己修改任務(wù)的間隔時(shí)間的!(這個(gè)值是設(shè)置到數(shù)據(jù)庫(kù)中的),因?yàn)镾impleTriggerBean必須設(shè)置repeatInterval屬性,而這個(gè)值因?yàn)槭潜4嬖跀?shù)據(jù)中的,所以我想設(shè)置兩個(gè)定時(shí)任務(wù)CMSTransformCRMTrigger和ScheduleInfoActionTrigger,ScheduleInfoActionTrigger在CMSTransformCRMTrigger任務(wù)執(zhí)行前觸發(fā):其目的是為CMSTransformCRMTrigger根據(jù)數(shù)據(jù)庫(kù)的值設(shè)置其repeatInterval屬性,配置文件如下:















































































ScheduleInfoAction是動(dòng)態(tài)設(shè)置間隔時(shí)間的接口:











































但是不知為和兩個(gè)任務(wù)都不執(zhí)行?
后面我再在程序啟動(dòng)時(shí)就通過(guò)ScheduleInfoAction的factoryBean
設(shè)置CMSTransformCRMTrigger其repeatInterval屬性,只保留一個(gè)定時(shí)任務(wù)就可以了,
配置如下:































但總感覺(jué)到有點(diǎn)笨拙,你幫忙參考下,為什么repeatInterval不能通過(guò)繼承SimpleTriggerBean復(fù)寫(xiě)getRepeatInterval方法去設(shè)置呢?
re: Spring Quartz如何動(dòng)態(tài)配置時(shí)間(3) boddi 2007-08-10 12:14
thrank you!
是這樣的,客戶(hù)有個(gè)需求是可以自己修改任務(wù)的間隔時(shí)間的!(這個(gè)值是設(shè)置到數(shù)據(jù)庫(kù)中的),因?yàn)镾impleTriggerBean必須設(shè)置repeatInterval屬性,而這個(gè)值因?yàn)槭潜4嬖跀?shù)據(jù)中的,所以我想設(shè)置兩個(gè)定時(shí)任務(wù)CMSTransformCRMTrigger和ScheduleInfoActionTrigger,ScheduleInfoActionTrigger在CMSTransformCRMTrigger任務(wù)執(zhí)行前觸發(fā):其目的是為CMSTransformCRMTrigger根據(jù)數(shù)據(jù)庫(kù)的值設(shè)置其repeatInterval屬性,配置文件如下:
<bean id="CMSTransformCRMEngine" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource">
<bean class="org.springframework.aop.target.SingletonTargetSource">
<constructor-arg>
<bean class="com.server.business.cms.CMSTransformCRMEngine"/>
</constructor-arg>
</bean>
</property>
<property name="interceptorNames">
<list>
<value>CallContextInterceptor</value>
</list>
</property>
</bean>

<bean id="CMSTransformCRMJob" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass">
<value>com.wisecrm.server.business.cms.CMSTransformCRMScheduledTask</value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="cmsTranCRMEnginer">
<ref bean="CMSTransformCRMEngine"></ref>
</entry>
</map>
</property>
</bean>
<bean id="CMSTransformCRMTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail">
<ref bean="CMSTransformCRMJob"></ref>
</property>
<property name="startDelay">
<value>90000</value>
</property>
<property name="repeatInterval">
<value>90000</value>
</property>
</bean>
<bean id="ScheduleInfoAction" class="com.wisecrm.server.business.cms.ScheduleInfoAction">
<property name="dataSource" ref="DataSource"/>
<property name="scheduler" ref="schedulerFactory"/>
</bean>
<bean id="ScheduleInfoActionFactory" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="ScheduleInfoAction"/>
<property name="targetMethod">
<value>setTaskTimeByPreference</value>
</property>
<!--property name="arguments">
<list>
<ref local="DataSource"/>
<ref local="schedulerFactory"/>
</list>
</property-->
<property name="concurrent" value="false"/>
</bean>
<bean id="ScheduleInfoActionTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail">
<ref bean="ScheduleInfoActionFactory"></ref>
</property>
<property name="startDelay">
<value>80000</value>
</property>
<property name="repeatInterval">
<value>50000</value>
</property>
</bean>
<bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="CMSTransformCRMTrigger"/>
<ref local="ScheduleInfoActionTrigger"/>
</list>
</property>
</bean>
ScheduleInfoAction是動(dòng)態(tài)設(shè)置間隔時(shí)間的接口:
是這樣的,客戶(hù)有個(gè)需求是可以自己修改任務(wù)的間隔時(shí)間的!(這個(gè)值是設(shè)置到數(shù)據(jù)庫(kù)中的),因?yàn)镾impleTriggerBean必須設(shè)置repeatInterval屬性,而這個(gè)值因?yàn)槭潜4嬖跀?shù)據(jù)中的,所以我想設(shè)置兩個(gè)定時(shí)任務(wù)CMSTransformCRMTrigger和ScheduleInfoActionTrigger,ScheduleInfoActionTrigger在CMSTransformCRMTrigger任務(wù)執(zhí)行前觸發(fā):其目的是為CMSTransformCRMTrigger根據(jù)數(shù)據(jù)庫(kù)的值設(shè)置其repeatInterval屬性,配置文件如下:















































































ScheduleInfoAction是動(dòng)態(tài)設(shè)置間隔時(shí)間的接口:











































但是不知為和兩個(gè)任務(wù)都不執(zhí)行?
后面我再在程序啟動(dòng)時(shí)就通過(guò)ScheduleInfoAction的factoryBean
設(shè)置CMSTransformCRMTrigger其repeatInterval屬性,只保留一個(gè)定時(shí)任務(wù)就可以了,
配置如下:































re: javaexcelapplication boddi 2007-06-07 15:35
其實(shí)excel的sheet不可以一個(gè)都沒(méi)有的
re: birt 2.0 is now available....占個(gè)頭位,宣傳一下 boddi 2006-09-06 07:36
導(dǎo)出excel如何進(jìn)行?謝謝
re: spring、ibatis控制oracle分頁(yè)的問(wèn)題 boddi 2006-08-31 18:21
SELECT wjbh,wjmc FROM (SELECT row_.*, rownum rownum_ FROM (select wjbh,wjmc,rownum rn from y_wjlx) row_ WHERE rownum <= #end#) WHERE rownum_ > #start#
在SQLSERVER中無(wú)法實(shí)現(xiàn)啊!請(qǐng)問(wèn)SQLSERVER有何高招嗎?謝謝
在SQLSERVER中無(wú)法實(shí)現(xiàn)啊!請(qǐng)問(wèn)SQLSERVER有何高招嗎?謝謝
re: spring、ibatis控制oracle分頁(yè)的問(wèn)題 boddi 2006-08-30 14:05
SELECT wjbh,wjmc FROM (SELECT row_.*, rownum rownum_ FROM (select wjbh,wjmc,rownum rn from y_wjlx) row_ WHERE rownum <= #end#) WHERE rownum_ > #start#
中的select wjbh,wjmc,rownum rn from y_wjlx不會(huì)造成很大的效率問(wèn)題嗎?
中的select wjbh,wjmc,rownum rn from y_wjlx不會(huì)造成很大的效率問(wèn)題嗎?