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

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

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

    Oracle神諭

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      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:
    經常地,你僅僅需要調用一個對象的一個方法。使用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 你不需要創建一個在線的jobs,僅僅調用它的方法,你可以僅僅只需要創建一個實際的邏輯對象并且把它綁定到細節對象。

    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是無狀態的,在jobs的可能性作為結果影響彼此。如果你限定兩個觸發器為同一個JohDetail,它在第一個job已經完成時是可能的,第二個將會開始。如果JobDetail實現了狀態接口,它將不會發生。
    <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世界暢談 閱讀(3144) 評論(0)  編輯  收藏 所屬分類: Spring
    主站蜘蛛池模板: 麻豆国产VA免费精品高清在线| a级成人毛片免费视频高清| 在线观着免费观看国产黄| 亚洲综合色一区二区三区小说| a级毛片高清免费视频| 国产日韩亚洲大尺度高清| 中文字幕a∨在线乱码免费看| 国产成人精品曰本亚洲79ren| 一级全免费视频播放| 亚洲?v女人的天堂在线观看| 无遮挡免费一区二区三区| 又大又黄又粗又爽的免费视频 | 69国产精品视频免费| 精品亚洲成a人片在线观看| 久久午夜夜伦鲁鲁片免费无码影视| 久久亚洲熟女cc98cm| 亚洲免费福利在线视频| 亚洲kkk4444在线观看| 国产精品色午夜视频免费看| 麻豆安全免费网址入口| 亚洲伊人久久精品影院| 久久精品国产亚洲AV忘忧草18| 成年免费大片黄在线观看岛国| 亚洲高清毛片一区二区| 亚洲国产婷婷综合在线精品| 国产在线播放线91免费| 亚洲一区二区在线免费观看| 午夜宅男在线永久免费观看网 | 一区二区免费电影| 亚洲va中文字幕无码久久| 亚洲欧美第一成人网站7777| 又粗又硬又黄又爽的免费视频| 国内永久免费crm系统z在线| 亚洲精品永久www忘忧草| 日韩成人免费在线| baoyu777永久免费视频| 亚洲国产精品线观看不卡| 免费在线视频一区| 99re热精品视频国产免费| 国产成人精品日本亚洲语音 | 6080午夜一级毛片免费看|