alxe1528

          BlogJava 聯系 聚合 管理
            3 Posts :: 11 Stories :: 2 Comments :: 0 Trackbacks
          <bean id="taskExecutor"
                  class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
                  <property name="corePoolSize" value="5" />
                  <property name="maxPoolSize" value="15" />
                  <property name="queueCapacity" value="25" />
              </bean>

              <bean id="companyTimeTaskExecutorQueueConsumer"
                  class="cn.sh.online.comment.util.timer.CompanyTimeTaskExecutorQueueConsumer">
                  <constructor-arg ref="taskExecutor" />
                  <constructor-arg ref="commentContentService" />
                  <constructor-arg ref="timerIpFilter" />
                  <constructor-arg ref="timerKeywordFilter" />
                  <constructor-arg ref="timerBlackNameFilter" />
              </bean>


              <bean id="restTimeTaskExecutorQueueConsumer"
                  class="cn.sh.online.comment.util.timer.RestTimeTaskExecutorQueueConsumer">
                  <constructor-arg ref="taskExecutor" />
                  <constructor-arg ref="commentContentService" />
                  <constructor-arg ref="timerIpFilter" />
                  <constructor-arg ref="timerKeywordFilter" />
                  <constructor-arg ref="timerBlackNameFilter" />
              </bean>

              <bean id="companyTimeJob"
                  class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
                  <property name="targetObject">
                      <ref bean="companyTimeTaskExecutorQueueConsumer" />
                  </property>
                  <property name="targetMethod">
                      <value>eatCommentContentFrontDto</value>
                  </property>
              </bean>

              <bean id="restTimeJob"
                  class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
                  <property name="targetObject">
                      <ref bean="restTimeTaskExecutorQueueConsumer" />
                  </property>
                  <property name="targetMethod">
                      <value>eatCommentContentFrontDto</value>
                  </property>
              </bean>

              <bean id="companyTimeCron"
                  class="org.springframework.scheduling.quartz.CronTriggerBean">
                  <property name="jobDetail">
                      <ref bean="companyTimeJob" />
                  </property>
                  <property name="cronexpression_r_r">
                      <value>*/5 * 0-7 * * ?</value>
                  </property>
              </bean>


              <bean id="restTimeCron"
                  class="org.springframework.scheduling.quartz.CronTriggerBean">
                  <property name="jobDetail">
                      <ref bean="restTimeJob" />
                  </property>
                  <property name="cronexpression_r_r">
                      <value>*/5 * 8-17 * * ?</value>
                  </property>
              </bean>

              <bean autowire="no"
                  class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
                  <property name="triggers">
                      <list>
                          <ref local="companyTimeCron" />
                          <ref local="restTimeCron" />
                      </list>
                  </property>
              </bean>
          posted on 2012-01-02 11:57 鄭健成 閱讀(471) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 镇赉县| 林周县| 壤塘县| 琼中| 蓝山县| 吉林省| 嘉峪关市| 根河市| 湘潭市| 高雄市| 徐州市| 蚌埠市| 平顶山市| 五华县| 章丘市| 友谊县| 沽源县| 香港| 金坛市| 芜湖市| 神池县| 佛冈县| 清流县| 镇坪县| 都江堰市| 阿荣旗| 桂林市| 门源| 绩溪县| 台江县| 康平县| 泽州县| 临武县| 澎湖县| 友谊县| 固镇县| 万年县| 桐柏县| 中山市| 广宁县| 宜昌市|