Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuartzConfig properties are ignored #27

Open
neodevelop opened this issue May 28, 2012 · 1 comment
Open

QuartzConfig properties are ignored #27

neodevelop opened this issue May 28, 2012 · 1 comment

Comments

@neodevelop
Copy link

Hi nebolsin!
I had a problem with the plugin, using de jdbcStore option for Quartz. Take me a few days to know what was it. But I solved, I don't know how can I put this in the code of your plugin; I describe:

When I trying to run the app throws me an exception: Datasource not set, I searched for solutions, I explore the code, the interesting part it was:

// delay scheduler startup to after-bootstrap stage
            autoStartup = false
            if (config.jdbcStore) {
                dataSource = ref('dataSource')
                transactionManager = ref('transactionManager')
            }

For some reason, Idon't know why, the dataSource wasn't injecting

Instead of using environments closure, I used this:

import grails.util.Environment

quartz {
  switch(Environment.current) {
    case Environment.DEVELOPMENT:
      autoStartup = true
      jdbcStore = false
    break
    case Environment.TEST:
      autoStartup = false
      jdbcStore = false
    break
    case Environment.PRODUCTION:
      autoStartup = true
      jdbcStore = true
      waitForJobsToCompleteOnShutdown = true
    break
  }
}

The problem was solved....

@neodevelop
Copy link
Author

Where can I put this in the plugin, and I put this code and make the pull request...
Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant