Primavera + cuarzo hacen un trabajo 7 veces

i'm trying to do quartz scheduling from this link: QUARTZ+SPRING

But when I run this on a glassfish it makes the job 7times.


<bean id="exampleBusinessObject" class="cz.elit.ediplus.core.dao.ExampleBusinessObject" 
    p:packingListService-ref="PackingListService" />

<bean id="jobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
    <property name="targetObject" ref="exampleBusinessObject"/>
    <property name="targetMethod" value="doIt"/>
    <property name="concurrent" value="false"/>
<bean id="simpleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
      <property name="jobDetail" ref="jobDetail"/>
    <property name="startDelay" value="10000"/>
    <property name="repeatInterval" value="300000"/>
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    <property name="triggers">
            <ref bean="simpleTrigger"/>

and some code from web.xml


Does anyone know where the mistake could be? I read some forums, but with no effect. The strange thing is, when I run it on localhost, the job runs only one time, but when I deploy it on a main server, the job runs seventimes.

preguntado el 03 de mayo de 12 a las 15:05

Are you using glassfish locally too when it "works"? Or are you using a different container on localhost? -

yes on a localhost I use glassfish too.. could it be in a different version of GF? -

@yen1k Do you happen to have multiple load balanced servers in production? Each server instance will run its own job. -

@maple_shaft No, it has not loadballancing. :-/ Do You think it could be in GF settings? Info for me, where to start to looking for mistake.. :-) -

This is not a solution, but better use doc for version 3.1.x… version 1.2.x is quite old. -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.