SlideShare a Scribd company logo
1 of 17
Quartz plugin
(Advanced)
1.Quick presentation on how to use
2. TaskArtifact
3.Bootstrap of Plugin
4.QuartzGrailsPlugin MetaData
5.Plugin Events and Application Reloading
Agenda
Insidethe Grails
Plugin
● Artefact isused to refer to a Groovy file that fulfils a certain concept.
–Controller, Bootstrap, Codec, Service, Domain,TagLib
● For each artefact type, the GrailsApplication class provides dynamic
methods to access the artefacts of that
–grailsApplication.getControllerClasses()
–Dynamic finders onDomain
What is Grails Artefact?
● Created by Quartz-plugin to model the idea of a job
● Created TaskArtefactHandler class byextending
ArtefactHandlerAdapter class
● Provided implementation for boolean isArtefactClass()method
● Made Grails aware of the new Artifact as
–def artefacts =[newTaskArtefactHandler()]
Task Artefact
Now the statements like this can be used
application.taskClasses.each{
GrailsTaskClass tc ->
//------------------
}
Task Artefact Cond...
● Do WithSpring
● Do With DynamicMethods
● Do WithApplication
Context
QuartzGrailsPlugin MetaData
● participation in the runtime configuration of
Grails’ underlying SpringApplicationContext
–creating beans, binding hibernate session
etc
Do With Spring
● Merges DefaultQuartzConfig and QuartzConfiginto
appications main config file
● Bind Hibernate Sessionto each Job's thread using
SessionBinderJobListenerclass
● Create bean quartzScheduler which isan instance of
SchedulerFactoryBean
Do With Spring Cond...
● Executed after the construction of the
ApplicationContext.
– Usage example - provide new behavior to Grails
classes
Do With Dynamic Methods
● Injects the following static methods to TaskArtefact classes -
–Schedule
–TriggerNow
–RemoveJob
● e.g. FileUsageMonitorJob.triggerNow()
● calling theInstead of injecting qartzScheduler bean and
triggerNow with jobdetails
Do With Dynamic Methods cond...
● Executed after Grails’ ApplicationContext has been
constructed
● Thisclosure ispassed applicationContext asfirst arg
–Add all jobs to quartzScheduler
–Schedules job for each trigger
Do With Application Context
● A plugin can essentially listen for three core events:
● onChange
● onConfigChange
● onShutdown
Plugin Events and Application Reloading
● Changes to resources being watched by the plugin
● def watchedResources =[”...**/*Job.groovy”]
● Quartz plugin creates new bean(after removing if it
is already there) and register all the triggers for
each changed jobclass.
On Change
● Calls shutdown method of quartzScheduler bean
On Shutdown
Contact us
Our Office
Client
Location
Click Here To Know More!
Have more queries on Grails?
Talk to our GRAILS experts
Now!
Talk To Our Experts
Here's how the world's
biggest Grails team is
building enterprise
applications on Grails!

More Related Content

What's hot

視網膜手術最新發展
視網膜手術最新發展視網膜手術最新發展
視網膜手術最新發展
Gary Lee
 
Drupal course - batch API
Drupal course - batch APIDrupal course - batch API
Drupal course - batch API
Dániel Kalmár
 

What's hot (20)

OpenStack reliability metrics
OpenStack reliability metricsOpenStack reliability metrics
OpenStack reliability metrics
 
Airflow 101
Airflow 101Airflow 101
Airflow 101
 
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
What's coming in Airflow 2.0? - NYC Apache Airflow MeetupWhat's coming in Airflow 2.0? - NYC Apache Airflow Meetup
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
 
Flow router, components and props
Flow router, components and propsFlow router, components and props
Flow router, components and props
 
OASGraph LoopBack 4 Integration
OASGraph LoopBack 4 IntegrationOASGraph LoopBack 4 Integration
OASGraph LoopBack 4 Integration
 
視網膜手術最新發展
視網膜手術最新發展視網膜手術最新發展
視網膜手術最新發展
 
From AWS Data Pipeline to Airflow - managing data pipelines in Nielsen Market...
From AWS Data Pipeline to Airflow - managing data pipelines in Nielsen Market...From AWS Data Pipeline to Airflow - managing data pipelines in Nielsen Market...
From AWS Data Pipeline to Airflow - managing data pipelines in Nielsen Market...
 
Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite
 
Pywps
PywpsPywps
Pywps
 
CQL
CQLCQL
CQL
 
React Meetup 2
React Meetup 2React Meetup 2
React Meetup 2
 
Sprint 18
Sprint 18Sprint 18
Sprint 18
 
Introduction to react native @ TIC NUST
Introduction to react native @ TIC NUSTIntroduction to react native @ TIC NUST
Introduction to react native @ TIC NUST
 
Alfresco勉強会#40 QRコードによる文書の振り分け
Alfresco勉強会#40 QRコードによる文書の振り分けAlfresco勉強会#40 QRコードによる文書の振り分け
Alfresco勉強会#40 QRコードによる文書の振り分け
 
Fyber - airflow best practices in production
Fyber - airflow best practices in productionFyber - airflow best practices in production
Fyber - airflow best practices in production
 
Sprint 12
Sprint 12Sprint 12
Sprint 12
 
Drupal course - batch API
Drupal course - batch APIDrupal course - batch API
Drupal course - batch API
 
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
 
Lyon Studytrip - Microservices in Docker & Kubernetes
Lyon Studytrip - Microservices in Docker & KubernetesLyon Studytrip - Microservices in Docker & Kubernetes
Lyon Studytrip - Microservices in Docker & Kubernetes
 
Agile sre fly beyond the clouds olx core went aws- Wojciech Krysmann
Agile sre fly beyond the clouds   olx core went aws- Wojciech KrysmannAgile sre fly beyond the clouds   olx core went aws- Wojciech Krysmann
Agile sre fly beyond the clouds olx core went aws- Wojciech Krysmann
 

Viewers also liked

Behavioural Marketing…or how to get your customers to love you
Behavioural Marketing…or how to get your customers to love youBehavioural Marketing…or how to get your customers to love you
Behavioural Marketing…or how to get your customers to love you
John Watton
 
FUKUYAMA BASE WORKSHOP Vol12 Theme
FUKUYAMA BASE WORKSHOP Vol12 ThemeFUKUYAMA BASE WORKSHOP Vol12 Theme
FUKUYAMA BASE WORKSHOP Vol12 Theme
noteproject
 
0.sistemadesalud.hospitales
0.sistemadesalud.hospitales0.sistemadesalud.hospitales
0.sistemadesalud.hospitales
Rcabellocaja
 
2013: What to Expect and How to Succeed in the Year of the Buyer
2013: What to Expect and How to Succeed in the Year of the Buyer2013: What to Expect and How to Succeed in the Year of the Buyer
2013: What to Expect and How to Succeed in the Year of the Buyer
John Watton
 
Micky’lerin macerasi
Micky’lerin macerasiMicky’lerin macerasi
Micky’lerin macerasi
hülya
 
Production schedule 2011
Production schedule 2011Production schedule 2011
Production schedule 2011
sathma
 
FUKUYAMA BASE WORKSHOP Vol11 Theme
FUKUYAMA BASE WORKSHOP Vol11 ThemeFUKUYAMA BASE WORKSHOP Vol11 Theme
FUKUYAMA BASE WORKSHOP Vol11 Theme
noteproject
 
Traditioalnl vs no
Traditioalnl vs noTraditioalnl vs no
Traditioalnl vs no
sathma
 
Audience feedback
Audience feedbackAudience feedback
Audience feedback
sathma
 
Nurturing: Where Human Touch & Digital Practices come together
Nurturing: Where Human Touch & Digital Practices come togetherNurturing: Where Human Touch & Digital Practices come together
Nurturing: Where Human Touch & Digital Practices come together
John Watton
 
Open day presentation
Open day presentationOpen day presentation
Open day presentation
sallyross
 

Viewers also liked (20)

Jeopardy
JeopardyJeopardy
Jeopardy
 
Tech Girl Podcasts: What is Web 2.0?
Tech Girl Podcasts: What is Web 2.0?Tech Girl Podcasts: What is Web 2.0?
Tech Girl Podcasts: What is Web 2.0?
 
Black Men Speak, Inc Workshop Dec 2013
Black Men Speak, Inc Workshop Dec 2013 Black Men Speak, Inc Workshop Dec 2013
Black Men Speak, Inc Workshop Dec 2013
 
Behavioural Marketing…or how to get your customers to love you
Behavioural Marketing…or how to get your customers to love youBehavioural Marketing…or how to get your customers to love you
Behavioural Marketing…or how to get your customers to love you
 
Gastcollege Universiteit Utrecht 'Games in het onderwijs'
Gastcollege Universiteit Utrecht 'Games in het onderwijs'Gastcollege Universiteit Utrecht 'Games in het onderwijs'
Gastcollege Universiteit Utrecht 'Games in het onderwijs'
 
State of Search 2013
State of Search 2013State of Search 2013
State of Search 2013
 
Playful learning - gamification in het onderwijs
Playful learning - gamification in het onderwijsPlayful learning - gamification in het onderwijs
Playful learning - gamification in het onderwijs
 
FUKUYAMA BASE WORKSHOP Vol12 Theme
FUKUYAMA BASE WORKSHOP Vol12 ThemeFUKUYAMA BASE WORKSHOP Vol12 Theme
FUKUYAMA BASE WORKSHOP Vol12 Theme
 
0.sistemadesalud.hospitales
0.sistemadesalud.hospitales0.sistemadesalud.hospitales
0.sistemadesalud.hospitales
 
2013: What to Expect and How to Succeed in the Year of the Buyer
2013: What to Expect and How to Succeed in the Year of the Buyer2013: What to Expect and How to Succeed in the Year of the Buyer
2013: What to Expect and How to Succeed in the Year of the Buyer
 
Micky’lerin macerasi
Micky’lerin macerasiMicky’lerin macerasi
Micky’lerin macerasi
 
Production schedule 2011
Production schedule 2011Production schedule 2011
Production schedule 2011
 
FUKUYAMA BASE WORKSHOP Vol11 Theme
FUKUYAMA BASE WORKSHOP Vol11 ThemeFUKUYAMA BASE WORKSHOP Vol11 Theme
FUKUYAMA BASE WORKSHOP Vol11 Theme
 
Traditioalnl vs no
Traditioalnl vs noTraditioalnl vs no
Traditioalnl vs no
 
Audience feedback
Audience feedbackAudience feedback
Audience feedback
 
Nurturing: Where Human Touch & Digital Practices come together
Nurturing: Where Human Touch & Digital Practices come togetherNurturing: Where Human Touch & Digital Practices come together
Nurturing: Where Human Touch & Digital Practices come together
 
Ppt qa 2
Ppt qa 2Ppt qa 2
Ppt qa 2
 
Open day presentation
Open day presentationOpen day presentation
Open day presentation
 
Brand focus
Brand focusBrand focus
Brand focus
 
Unit v
Unit vUnit v
Unit v
 

Similar to Advanced guide to Quartz plugin

From SQLAlchemy to Ming with TurboGears2
From SQLAlchemy to Ming with TurboGears2From SQLAlchemy to Ming with TurboGears2
From SQLAlchemy to Ming with TurboGears2
Alessandro Molina
 

Similar to Advanced guide to Quartz plugin (20)

Grails plugin development
Grails plugin developmentGrails plugin development
Grails plugin development
 
React inter3
React inter3React inter3
React inter3
 
Android App Development - 07 Threading
Android App Development - 07 ThreadingAndroid App Development - 07 Threading
Android App Development - 07 Threading
 
YEGOR MAKSYMCHUK «Using Kubernetes for organization performance tests»
YEGOR MAKSYMCHUK «Using Kubernetes for organization performance tests»YEGOR MAKSYMCHUK «Using Kubernetes for organization performance tests»
YEGOR MAKSYMCHUK «Using Kubernetes for organization performance tests»
 
Angular Optimization Web Performance Meetup
Angular Optimization Web Performance MeetupAngular Optimization Web Performance Meetup
Angular Optimization Web Performance Meetup
 
Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use cases
 
Gephi Toolkit Tutorial
Gephi Toolkit TutorialGephi Toolkit Tutorial
Gephi Toolkit Tutorial
 
The Ring programming language version 1.7 book - Part 75 of 196
The Ring programming language version 1.7 book - Part 75 of 196The Ring programming language version 1.7 book - Part 75 of 196
The Ring programming language version 1.7 book - Part 75 of 196
 
Dependency injection using dagger2
Dependency injection using dagger2Dependency injection using dagger2
Dependency injection using dagger2
 
The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202
 
Microservices and modularity with java
Microservices and modularity with javaMicroservices and modularity with java
Microservices and modularity with java
 
CICD Pipeline configuration as a code
CICD Pipeline configuration as a codeCICD Pipeline configuration as a code
CICD Pipeline configuration as a code
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
 
Angular2 inter3
Angular2 inter3Angular2 inter3
Angular2 inter3
 
GraphQL-ify your APIs
GraphQL-ify your APIsGraphQL-ify your APIs
GraphQL-ify your APIs
 
Fundamental Concepts of React JS for Beginners.pdf
Fundamental Concepts of React JS for Beginners.pdfFundamental Concepts of React JS for Beginners.pdf
Fundamental Concepts of React JS for Beginners.pdf
 
Developing Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideDeveloping Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's Guide
 
Improving your Gradle builds
Improving your Gradle buildsImproving your Gradle builds
Improving your Gradle builds
 
RxJava@Android
RxJava@AndroidRxJava@Android
RxJava@Android
 
From SQLAlchemy to Ming with TurboGears2
From SQLAlchemy to Ming with TurboGears2From SQLAlchemy to Ming with TurboGears2
From SQLAlchemy to Ming with TurboGears2
 

More from TO THE NEW | Technology

10 Pragmatic UX techniques for building smarter products:
10 Pragmatic UX techniques for building smarter products:10 Pragmatic UX techniques for building smarter products:
10 Pragmatic UX techniques for building smarter products:
TO THE NEW | Technology
 
12 Key points which make Swift more effective than Objective C
12 Key points which make Swift more effective than Objective C12 Key points which make Swift more effective than Objective C
12 Key points which make Swift more effective than Objective C
TO THE NEW | Technology
 
AWS CodeDeploy
AWS CodeDeployAWS CodeDeploy
AWS CodeDeploy
TO THE NEW | Technology
 
MongoDb and NoSQL
MongoDb and NoSQLMongoDb and NoSQL
MongoDb and NoSQL
TO THE NEW | Technology
 
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
TO THE NEW | Technology
 
BigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearchBigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearch
TO THE NEW | Technology
 
Grails Spock Testing
Grails Spock TestingGrails Spock Testing
Grails Spock Testing
TO THE NEW | Technology
 
Introduction to Kanban
Introduction to KanbanIntroduction to Kanban
Introduction to Kanban
TO THE NEW | Technology
 

More from TO THE NEW | Technology (20)

10 Best Node.js Practices you Need to Know!
10 Best Node.js Practices you Need to Know!10 Best Node.js Practices you Need to Know!
10 Best Node.js Practices you Need to Know!
 
10 Pragmatic UX techniques for building smarter products:
10 Pragmatic UX techniques for building smarter products:10 Pragmatic UX techniques for building smarter products:
10 Pragmatic UX techniques for building smarter products:
 
12 Key points which make Swift more effective than Objective C
12 Key points which make Swift more effective than Objective C12 Key points which make Swift more effective than Objective C
12 Key points which make Swift more effective than Objective C
 
Gulp - The Streaming Build System
Gulp - The Streaming Build SystemGulp - The Streaming Build System
Gulp - The Streaming Build System
 
Grails Spring Boot
Grails Spring BootGrails Spring Boot
Grails Spring Boot
 
AWS Elastic Beanstalk
AWS Elastic BeanstalkAWS Elastic Beanstalk
AWS Elastic Beanstalk
 
Content migration to AEM
Content migration to AEMContent migration to AEM
Content migration to AEM
 
AWS CodeDeploy
AWS CodeDeployAWS CodeDeploy
AWS CodeDeploy
 
Big Data Expertise
Big Data ExpertiseBig Data Expertise
Big Data Expertise
 
An introduction to Object Oriented JavaScript
An introduction to Object Oriented JavaScriptAn introduction to Object Oriented JavaScript
An introduction to Object Oriented JavaScript
 
Object Oriented JavaScript - II
Object Oriented JavaScript - IIObject Oriented JavaScript - II
Object Oriented JavaScript - II
 
MongoDb and NoSQL
MongoDb and NoSQLMongoDb and NoSQL
MongoDb and NoSQL
 
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
(AWS) Auto Scaling : Evening Session by Amazon and IntelliGrape Software
 
MongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behlMongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behl
 
Cloud Formation
Cloud FormationCloud Formation
Cloud Formation
 
BigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearchBigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearch
 
JULY IN GRAILS
JULY IN GRAILSJULY IN GRAILS
JULY IN GRAILS
 
Grails Spock Testing
Grails Spock TestingGrails Spock Testing
Grails Spock Testing
 
Getting groovier-with-vertx
Getting groovier-with-vertxGetting groovier-with-vertx
Getting groovier-with-vertx
 
Introduction to Kanban
Introduction to KanbanIntroduction to Kanban
Introduction to Kanban
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 

Advanced guide to Quartz plugin

  • 1.
  • 3. 1.Quick presentation on how to use 2. TaskArtifact 3.Bootstrap of Plugin 4.QuartzGrailsPlugin MetaData 5.Plugin Events and Application Reloading Agenda
  • 5. ● Artefact isused to refer to a Groovy file that fulfils a certain concept. –Controller, Bootstrap, Codec, Service, Domain,TagLib ● For each artefact type, the GrailsApplication class provides dynamic methods to access the artefacts of that –grailsApplication.getControllerClasses() –Dynamic finders onDomain What is Grails Artefact?
  • 6. ● Created by Quartz-plugin to model the idea of a job ● Created TaskArtefactHandler class byextending ArtefactHandlerAdapter class ● Provided implementation for boolean isArtefactClass()method ● Made Grails aware of the new Artifact as –def artefacts =[newTaskArtefactHandler()] Task Artefact
  • 7. Now the statements like this can be used application.taskClasses.each{ GrailsTaskClass tc -> //------------------ } Task Artefact Cond...
  • 8. ● Do WithSpring ● Do With DynamicMethods ● Do WithApplication Context QuartzGrailsPlugin MetaData
  • 9. ● participation in the runtime configuration of Grails’ underlying SpringApplicationContext –creating beans, binding hibernate session etc Do With Spring
  • 10. ● Merges DefaultQuartzConfig and QuartzConfiginto appications main config file ● Bind Hibernate Sessionto each Job's thread using SessionBinderJobListenerclass ● Create bean quartzScheduler which isan instance of SchedulerFactoryBean Do With Spring Cond...
  • 11. ● Executed after the construction of the ApplicationContext. – Usage example - provide new behavior to Grails classes Do With Dynamic Methods
  • 12. ● Injects the following static methods to TaskArtefact classes - –Schedule –TriggerNow –RemoveJob ● e.g. FileUsageMonitorJob.triggerNow() ● calling theInstead of injecting qartzScheduler bean and triggerNow with jobdetails Do With Dynamic Methods cond...
  • 13. ● Executed after Grails’ ApplicationContext has been constructed ● Thisclosure ispassed applicationContext asfirst arg –Add all jobs to quartzScheduler –Schedules job for each trigger Do With Application Context
  • 14. ● A plugin can essentially listen for three core events: ● onChange ● onConfigChange ● onShutdown Plugin Events and Application Reloading
  • 15. ● Changes to resources being watched by the plugin ● def watchedResources =[”...**/*Job.groovy”] ● Quartz plugin creates new bean(after removing if it is already there) and register all the triggers for each changed jobclass. On Change
  • 16. ● Calls shutdown method of quartzScheduler bean On Shutdown
  • 17. Contact us Our Office Client Location Click Here To Know More! Have more queries on Grails? Talk to our GRAILS experts Now! Talk To Our Experts Here's how the world's biggest Grails team is building enterprise applications on Grails!