Quartz Plugin Changes

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

Quartz Plugin Changes

Wangjammer7
Hi,

I've made some changes to my cloned quartz plugin repository that solves the issues relating to the handling of the quartz.properties file.

I've modified the plugin so that quartz properties can be supplied via the standard Grails configuration mechanism, here's how it looks in my current project:

environments { development { quartz { autoStartup = true if ( System.properties["quartz.clustered"] ) { jdbcStore = true props = [ 'scheduler.instanceId': 'AUTO', 'threadPool.class': 'org.quartz.simpl.SimpleThreadPool',
    ...

'plugin.shutdownhook.class': 'org.quartz.plugins.management.ShutdownHookPlugin', 'plugin.shutdownhook.cleanShutdown': true ] } else { jdbcStore = false } } }

- The 'props' map defines the properties that would 'normally' go into quartz.properties
- The property prefix 'org.quartz.' is appended to each key value in the 'props' map before it is passed to Spring/Quartz
- This is defined in QuartzConfig.groovy but can be defined in any of the merged configuration locations (Config/QuartzConfig/DefaultQuartzConfig)

If no 'props' section is defined, the plugin falls back to the original behaviour of setting the configLocation to that of the quartz.properties on the classpath.

Would it be possible to get this included into the next release of the plugin so we don't have to work from a cloned repository? I've sent a pull request to the github grails-quartz owner.


Thanks,

Chris Denman

Reply | Threaded
Open this post in threaded view
|

Re: Quartz Plugin Changes

Sergey Nebolsin
Hi, Chris!

Thanks for your contribution, for sure I'll pull it from your repo and include into the next release of the plugin.

Sorry for not replying you on the GitHub, I was on vacation.

Cheers

On Thu, May 6, 2010 at 17:08, Wangjammer7 <[hidden email]> wrote:
Hi,

I've made some changes to my cloned quartz plugin repository that solves the issues relating to the handling of the quartz.properties file.

I've modified the plugin so that quartz properties can be supplied via the standard Grails configuration mechanism, here's how it looks in my current project:

environments { development { quartz { autoStartup = true if ( System.properties["quartz.clustered"] ) { jdbcStore = true props = [ 'scheduler.instanceId': 'AUTO', 'threadPool.class': 'org.quartz.simpl.SimpleThreadPool',
    ...

'plugin.shutdownhook.class': 'org.quartz.plugins.management.ShutdownHookPlugin', 'plugin.shutdownhook.cleanShutdown': true ] } else { jdbcStore = false } } }

- The 'props' map defines the properties that would 'normally' go into quartz.properties
- The property prefix 'org.quartz.' is appended to each key value in the 'props' map before it is passed to Spring/Quartz
- This is defined in QuartzConfig.groovy but can be defined in any of the merged configuration locations (Config/QuartzConfig/DefaultQuartzConfig)

If no 'props' section is defined, the plugin falls back to the original behaviour of setting the configLocation to that of the quartz.properties on the classpath.

Would it be possible to get this included into the next release of the plugin so we don't have to work from a cloned repository? I've sent a pull request to the github grails-quartz owner.


Thanks,

Chris Denman




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

Re: Quartz Plugin Changes

Wangjammer7
Hi Sergey,

Excellent, thank you.

Thanks for the swift response.


Chris


On 6 May 2010, at 14:37, Sergey Nebolsin wrote:

Hi, Chris!

Thanks for your contribution, for sure I'll pull it from your repo and include into the next release of the plugin.

Sorry for not replying you on the GitHub, I was on vacation.

Cheers

On Thu, May 6, 2010 at 17:08, Wangjammer7 <[hidden email]> wrote:
Hi,

I've made some changes to my cloned quartz plugin repository that solves the issues relating to the handling of the quartz.properties file.

I've modified the plugin so that quartz properties can be supplied via the standard Grails configuration mechanism, here's how it looks in my current project:

environments { development { quartz { autoStartup = true if ( System.properties["quartz.clustered"] ) { jdbcStore = true props = [ 'scheduler.instanceId': 'AUTO', 'threadPool.class': 'org.quartz.simpl.SimpleThreadPool',
    ...

'plugin.shutdownhook.class': 'org.quartz.plugins.management.ShutdownHookPlugin', 'plugin.shutdownhook.cleanShutdown': true ] } else { jdbcStore = false } } }

- The 'props' map defines the properties that would 'normally' go into quartz.properties
- The property prefix 'org.quartz.' is appended to each key value in the 'props' map before it is passed to Spring/Quartz
- This is defined in QuartzConfig.groovy but can be defined in any of the merged configuration locations (Config/QuartzConfig/DefaultQuartzConfig)

If no 'props' section is defined, the plugin falls back to the original behaviour of setting the configLocation to that of the quartz.properties on the classpath.

Would it be possible to get this included into the next release of the plugin so we don't have to work from a cloned repository? I've sent a pull request to the github grails-quartz owner.


Thanks,

Chris Denman




--
Sergey Nebolsin
Chief Technical Officer
Prophotos.ru, Bestphotographer.ru

Reply | Threaded
Open this post in threaded view
|

Re: Quartz Plugin Changes

dgtgrails
In reply to this post by Sergey Nebolsin
Hi,

I am using the 1.0-SNAPSHOT version of the grails quartz  pluginn and am able to configure my properties in QuartzConfig.groovy....is there a way to access my grails application datasource properties (url, user, pw, driver) in this file ? using def dataSource in this file does not inject the data source....so I just want the quartzConfig to use the same datasource as my application....


Thanks