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)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 大英县| 福清市| 广灵县| 上思县| 崇仁县| 阜平县| 四川省| 河津市| 宁海县| 漯河市| 静乐县| 望奎县| 集安市| 安阳县| 浙江省| 响水县| 镇江市| 航空| 新晃| 紫金县| 荣成市| 桦川县| 山丹县| 永顺县| 彰武县| 于田县| 岳阳市| 伊金霍洛旗| 镇坪县| 东阳市| 遂宁市| 长岭县| 平昌县| 北宁市| 隆安县| 芒康县| 嘉峪关市| 济源市| 黔江区| 金川县| 西宁市|