Uploaded image for project: 'ServiceMix Components'
  1. ServiceMix Components
  2. SMXCOMP-446

Quartz Exception when declaring two sa with quartz endpoint

    XMLWordPrintableJSON

Details

    Description

      When you've two sa ( for example sa1 and for example sa2 ) and each one of this declare a quartz endpoint as the example below:

      SA1 xbean for quartz:
      ....
      <quartz:endpoint
      service="Es5_v_0:Es5.Step2_v_0"
      endpoint="Es5.Step2_v_0"
      targetService="Es5_v_0:Es5.EstraiNamespace_v_0">

      <quartz:trigger>
      <quartz:simple repeatCount="5"
      repeatInterval="5000" />
      </quartz:trigger>

      </quartz:endpoint>
      .....

      and SA2:

      <quartz:endpoint
      service="Es6_v_0:Es6.Step2_v_0"
      endpoint="Es6.Step2_v_0"
      targetService="Es6_v_0:Es6.EstraiNamespace_v_0">

      <quartz:trigger>
      <quartz:simple repeatCount="5"
      repeatInterval="5000" />
      </quartz:trigger>

      </quartz:endpoint>

      This will result in an exception:

      loc-message>Unable to start service unit</loc-message>
      </msg-loc-info>
      </task-status-msg>
      <exception-info>
      <nesting-level>1</nesting-level>
      <msg-loc-info>
      <loc-token/>
      <loc-message>New trigger is not related to the same job as the old trigger.</loc-message>
      <stack-trace><![CDATA[org.quartz.JobPersistenceException: New trigger is not related to the same job as the old trigger.
      at org.quartz.simpl.RAMJobStore.replaceTrigger(RAMJobStore.java:421)
      at org.quartz.core.QuartzScheduler.rescheduleJob(QuartzScheduler.java:771)
      at org.quartz.impl.StdScheduler.rescheduleJob(StdScheduler.java:297)
      at org.apache.servicemix.quartz.QuartzEndpoint.start(QuartzEndpoint.java:200)
      at org.apache.servicemix.common.DefaultServiceUnit.start(DefaultServiceUnit.java:78)
      at org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:155)
      at org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:103)
      at org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:132)
      at org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:378)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:355)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:667)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:631)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)
      ]]></stack-trace>
      </msg-loc-info>
      </exception-info>
      </task-result-details>
      </component-task-result-details>
      </component-task-result>
      </jbi-task-result>
      </jbi-task>

      Attachments

        1. QuartzEndpoint.java.patch
          0.4 kB
          Andrea Zoppello

        Activity

          People

            ccustine Chris Custine
            zoppello Andrea Zoppello
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: