Quartz Component In Mule Demo
Abstract
• The main motto of this PPT is how to use
Quartz component in our applications.
Introduction
• Quartz is a open source job scheduling
framework, that let you scheduler a task to
run on a predefine date and time.
Example
• hello world example
• .mflow
• <?xml version="1.0" encoding="UTF-8"?>
• <mule xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-current.xsd
• http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
• http://www.mulesoft.org/schema/mule/quartz
http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd">
• <flow name="QuartzUsageFlow1" doc:name="QuartzUsageFlow1">
• <quartz:inbound-endpoint jobName="myquartz" repeatInterval="10000"
responseTimeout="10000" doc:name="Quartz">
• <quartz:event-generator-job/>
• </quartz:inbound-endpoint>
• <logger message="--Hello world--" level="INFO" doc:name="Logger"/>
• </flow>
• </mule>
• Output:
• Flow of execution:
1. Service will trigger for every 10sec
2. Service will display a message called ‘Hello
world’
Benefits
• Quartz can run embedded within another free
standing application
• Quartz can be instantiated within an application
server (or servlet container), and participate in XA
transactions
• Quartz can run as a stand-alone program (within
its own Java Virtual Machine), to be used via RMI
• Quartz can be instantiated as a cluster of stand-
alone programs (with load-balance and fail-over
capabilities) for the execution of jobs
References
• https://developer.mulesoft.com/docs/display/
current/Quartz+Transport+Reference

Quartz component in mule

  • 1.
  • 2.
    Abstract • The mainmotto of this PPT is how to use Quartz component in our applications.
  • 3.
    Introduction • Quartz isa open source job scheduling framework, that let you scheduler a task to run on a predefine date and time.
  • 4.
  • 5.
    • .mflow • <?xmlversion="1.0" encoding="UTF-8"?> • <mule xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd • http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd • http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd"> • <flow name="QuartzUsageFlow1" doc:name="QuartzUsageFlow1"> • <quartz:inbound-endpoint jobName="myquartz" repeatInterval="10000" responseTimeout="10000" doc:name="Quartz"> • <quartz:event-generator-job/> • </quartz:inbound-endpoint> • <logger message="--Hello world--" level="INFO" doc:name="Logger"/> • </flow> • </mule>
  • 6.
  • 7.
    • Flow ofexecution: 1. Service will trigger for every 10sec 2. Service will display a message called ‘Hello world’
  • 8.
    Benefits • Quartz canrun embedded within another free standing application • Quartz can be instantiated within an application server (or servlet container), and participate in XA transactions • Quartz can run as a stand-alone program (within its own Java Virtual Machine), to be used via RMI • Quartz can be instantiated as a cluster of stand- alone programs (with load-balance and fail-over capabilities) for the execution of jobs
  • 9.