<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Oracle神諭

      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      284 隨筆 :: 9 文章 :: 106 評論 :: 0 Trackbacks

    Using the MethodInvokingJobDetailFactoryBean
    使用MethodInvokingJobDetailFactoryBean
    Often you just need to invoke a method on a specific object. Using the MethodInvokingJobDetailFactoryBean you can do exactly this:
    經(jīng)常地,你僅僅需要調(diào)用一個對象的一個方法。使用MethodInvokingJobDetailFactoryBean,你可以正確地這樣做:

    <bean id="methodInvokingJobDetail"
      class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
        <property name="targetObject"><ref bean="exampleBusinessObject"/></property>
        <property name="targetMethod"><value>doIt</value></property>
    </bean>


    The above example will result in the doIt being called on the exampleBusinessObject (see below):


    public class BusinessObject {
     
      // properties and collaborators
     
      public void doIt() {
        // do the actual work
      }
    }
       

    <bean id="exampleBusinessObject" class="examples.ExampleBusinessObject"/>
       
    Using the MethodInvokingJobDetailFactoryBean you don't need to create one-line jobs that just invoke a method, and you only need to create the actual business object and wire up the detail object.
    使用MethodInvokingJobDetailFactoryBean 你不需要創(chuàng)建一個在線的jobs,僅僅調(diào)用它的方法,你可以僅僅只需要創(chuàng)建一個實際的邏輯對象并且把它綁定到細節(jié)對象。

    By default, Quartz Jobs are stateless, resulting in the possibility of jobs interfering with each other. If you specify two triggers for the same JobDetail, it might be possible that before the first job has finished, the second one will start. If JobDetail objects implement the Stateful interface, this won't happen. The second job will not start before the first one has finished. To make jobs resulting from the MethodInvokingJobDetailFactoryBean non-concurrent, set the concurrent flag to false.

    缺省地,Quartz jobs是無狀態(tài)的,在jobs的可能性作為結果影響彼此。如果你限定兩個觸發(fā)器為同一個JohDetail,它在第一個job已經(jīng)完成時是可能的,第二個將會開始。如果JobDetail實現(xiàn)了狀態(tài)接口,它將不會發(fā)生。
    <bean id="methodInvokingJobDetail"
      class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
        <property name="targetObject"><ref bean="exampleBusinessObject"/></property>
        <property name="targetMethod"><value>doIt</value></property>
        <property name="concurrent"><value>false</value></property>
    </bean>
       
    Note: By default, jobs will run in a concurrent fashion.

     

    posted on 2005-07-22 11:23 java世界暢談 閱讀(3138) 評論(0)  編輯  收藏 所屬分類: Spring
    主站蜘蛛池模板: 五月天婷婷精品免费视频| 欧美亚洲国产SUV| 免费无码一区二区三区蜜桃| 久99精品视频在线观看婷亚洲片国产一区一级在线 | 五月亭亭免费高清在线| 久久亚洲中文字幕精品一区四 | 啦啦啦高清视频在线观看免费 | 亚洲人成国产精品无码| 成人亚洲国产精品久久| 国产一区二区三区在线免费观看 | 久久免费视频网站| 在线A亚洲老鸭窝天堂| 成人免费视频一区二区| 亚洲色成人网站WWW永久| 秋霞人成在线观看免费视频| 亚洲综合一区二区精品导航| 97人妻无码一区二区精品免费| xvideos亚洲永久网址| 国产免费人成视频尤勿视频| 亚洲性日韩精品一区二区三区 | 女人18毛片水真多免费播放| 亚洲GV天堂GV无码男同| 波多野结衣中文一区二区免费 | 四虎在线成人免费网站| 亚洲熟妇AV一区二区三区宅男| 国产精品免费久久久久电影网| 69免费视频大片| 亚洲国产精品成人精品小说| 成人最新午夜免费视频| 精品免费AV一区二区三区| 中文字幕在线亚洲精品| 亚欧色视频在线观看免费| 久久亚洲中文无码咪咪爱| 亚洲色偷拍另类无码专区| AA免费观看的1000部电影| 免费很黄无遮挡的视频毛片| 亚洲AV人无码综合在线观看| 免费黄色app网站| 国产精品区免费视频| 亚洲AV色无码乱码在线观看 | 国产免费丝袜调教视频|