Quartz job executed twice

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Quartz job executed twice

Finn Herpich | Marfinn Software GmbH
Hi *,

I've a very odd behaviour with a quartz-job, which gets executed twice:
executing Mon Apr 05 02:39:30 CEST 2010
executing Mon Apr 05 02:39:30 CEST 2010

I've broke it down to the code below. I'm chasing this since a few days and still no clue what the hack is going on.
I'm running on Grails 1.2.2, Quartz 0.4.1 and Tomcat 6.0.24
The double-execution does not happen with grails run-app.
The Tomcat-setup is pretty blank, a few other grails-apps but all running fine, also with quartz.

import tracker.SignalProcessingService

class CheckRawSignalsJob {
        SignalProcessingService signalProcessingService
        def sessionFactory
       
        def concurrent = false

    static triggers = {
        cron(name:'rawSignalsTrigger', startDelay:60000, cronExpression: '30 * * * * ?')
    }

    def execute() {
                println 'executing ' + new Date()


                // FIX: http://jira.codehaus.org/browse/GRAILSPLUGINS-1807
                // With this line exception has not throwed
    sessionFactory.currentSession.flush()
    }
}

Cheers
Finn

Marfinn Software GmbH
Firmensitz: Endenicher Straße 262, 53121 Bonn
Registergericht: Amtsgericht Bonn, HRB 16233
Geschäftsführer: Martin Hensel, Finn Herpich


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Quartz job executed twice

Finn Herpich | Marfinn Software GmbH
I must add, it seems very random and does not happen always.

Cheers

----- Original Message -----
From: Finn Herpich
[mailto:[hidden email]]
To: [hidden email]
Sent:
Mon, 05 Apr 2010 02:47:13 +0200
Subject: [grails-user] Quartz job executed
twice


> Hi *,
>
> I've a very odd behaviour with a quartz-job, which gets executed twice:
> executing Mon Apr 05 02:39:30 CEST 2010
> executing Mon Apr 05 02:39:30 CEST 2010
>
> I've broke it down to the code below. I'm chasing this since a few days and
> still no clue what the hack is going on.
> I'm running on Grails 1.2.2, Quartz 0.4.1 and Tomcat 6.0.24
> The double-execution does not happen with grails run-app.
> The Tomcat-setup is pretty blank, a few other grails-apps but all running
> fine, also with quartz.
>
> import tracker.SignalProcessingService
>
> class CheckRawSignalsJob {
> SignalProcessingService signalProcessingService
> def sessionFactory
>
> def concurrent = false
>
>     static triggers = {
>         cron(name:'rawSignalsTrigger', startDelay:60000, cronExpression: '30
> * * * * ?')
>     }
>
>     def execute() {
> println 'executing ' + new Date()
>
>
> // FIX: http://jira.codehaus.org/browse/GRAILSPLUGINS-1807
> // With this line exception has not throwed
>     sessionFactory.currentSession.flush()
>     }
> }
>
> Cheers
> Finn
>
> Marfinn Software GmbH
> Firmensitz: Endenicher Straße 262, 53121 Bonn
> Registergericht: Amtsgericht Bonn, HRB 16233
> Geschäftsführer: Martin Hensel, Finn Herpich
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>

Marfinn Software GmbH
Firmensitz: Endenicher Straße 262, 53121 Bonn
Registergericht: Amtsgericht Bonn, HRB 16233
Geschäftsführer: Martin Hensel, Finn Herpich


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Quartz job executed twice

Sergey Nebolsin
In reply to this post by Finn Herpich | Marfinn Software GmbH
Hi, Finn!

Try using 0.4.2 release, and if the problem persists — please raise an issue in the Jira.

FYI: 0.4.2 also fixes the problem with flushing the session, so you won't need to flush it manually.

Cheers

On Mon, Apr 5, 2010 at 04:47, Finn Herpich <[hidden email]> wrote:
Hi *,

I've a very odd behaviour with a quartz-job, which gets executed twice:
executing Mon Apr 05 02:39:30 CEST 2010
executing Mon Apr 05 02:39:30 CEST 2010

I've broke it down to the code below. I'm chasing this since a few days and still no clue what the hack is going on.
I'm running on Grails 1.2.2, Quartz 0.4.1 and Tomcat 6.0.24
The double-execution does not happen with grails run-app.
The Tomcat-setup is pretty blank, a few other grails-apps but all running fine, also with quartz.

import tracker.SignalProcessingService

class CheckRawSignalsJob {
       SignalProcessingService signalProcessingService
       def sessionFactory

       def concurrent = false

   static triggers = {
       cron(name:'rawSignalsTrigger', startDelay:60000, cronExpression: '30 * * * * ?')
   }

   def execute() {
               println 'executing ' + new Date()


               // FIX: http://jira.codehaus.org/browse/GRAILSPLUGINS-1807
               // With this line exception has not throwed
       sessionFactory.currentSession.flush()
   }
}

Cheers
Finn

Marfinn Software GmbH
Firmensitz: Endenicher Straße 262, 53121 Bonn
Registergericht: Amtsgericht Bonn, HRB 16233
Geschäftsführer: Martin Hensel, Finn Herpich


---------------------------------------------------------------------
To unsubscribe from this list, please visit:




--
Sergey Nebolsin
Chief Technical Officer
Prophotos.ru, Photoawards.ru
Reply | Threaded
Open this post in threaded view
|

Re: Quartz job executed twice

Finn Herpich | Marfinn Software GmbH
In reply to this post by Finn Herpich | Marfinn Software GmbH
Hey Sergey,

thanks for your hint for version 0.4.2 it looks good so far, but I've to do a few more tests.
Anyway, since the upgrade I get a

2010-04-09 14:58:08,779 [main] ERROR commons.DefaultGrailsApplication  - The class [org.grails.plugins.quartz.JobManagerService] was not found when attempting to load Grails application. Skipping.

at every startup. It doesn't seem to hurt anything but is this meant to happen? ;)

Cheers
Finn

----- Original Message -----
From: Sergey Nebolsin
[mailto:[hidden email]]
To: [hidden email]
Sent: Thu, 08 Apr
2010 07:39:30 +0200
Subject: Re: [grails-user] Quartz job executed twice


> Hi, Finn!
>
> Try using 0.4.2 release, and if the problem persists — please raise an
> issue
> in the Jira.
>
> FYI: 0.4.2 also fixes the problem with flushing the session, so you won't
> need to flush it manually.
>
> Cheers
>
> On Mon, Apr 5, 2010 at 04:47, Finn Herpich <[hidden email]
> > wrote:
>
> > Hi *,
> >
> > I've a very odd behaviour with a quartz-job, which gets executed twice:
> > executing Mon Apr 05 02:39:30 CEST 2010
> > executing Mon Apr 05 02:39:30 CEST 2010
> >
> > I've broke it down to the code below. I'm chasing this since a few days
> and
> > still no clue what the hack is going on.
> > I'm running on Grails 1.2.2, Quartz 0.4.1 and Tomcat 6.0.24
> > The double-execution does not happen with grails run-app.
> > The Tomcat-setup is pretty blank, a few other grails-apps but all running
> > fine, also with quartz.
> >
> > import tracker.SignalProcessingService
> >
> > class CheckRawSignalsJob {
> >        SignalProcessingService signalProcessingService
> >        def sessionFactory
> >
> >        def concurrent = false
> >
> >    static triggers = {
> >        cron(name:'rawSignalsTrigger', startDelay:60000, cronExpression:
> '30
> > * * * * ?')
> >    }
> >
> >    def execute() {
> >                println 'executing ' + new Date()
> >
> >
> >                // FIX: http://jira.codehaus.org/browse/GRAILSPLUGINS-1807
> >                // With this line exception has not throwed
> >        sessionFactory.currentSession.flush()
> >    }
> > }
> >
> > Cheers
> > Finn
> >
> > Marfinn Software GmbH
> > Firmensitz: Endenicher Straße 262, 53121 Bonn
> > Registergericht: Amtsgericht Bonn, HRB 16233
> > Geschäftsführer: Martin Hensel, Finn Herpich
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
> >
>
>
> --
> Sergey Nebolsin
> Chief Technical Officer
> Prophotos.ru, Photoawards.ru
>

Marfinn Software GmbH
Firmensitz: Endenicher Straße 262, 53121 Bonn
Registergericht: Amtsgericht Bonn, HRB 16233
Geschäftsführer: Martin Hensel, Finn Herpich


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email