|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (12)
View Page HistoryFor more details about Quartz usage, see url : [http://www.quartz-scheduler.org/|http://www.quartz-scheduler.org/]
{column}
{column:width=350px}
{column:width=350px}
h1. Service Configuration
{loremipsum:2}
h3. Job scheduling
CONSUME SERVICE : Call a JBI service according to a time expression.
CONSUME SERVICE : Call a JBI service according to a time expression.
h3. Service Unit dDescriptor
{loremipsum:1}
The Quartz component is configured with a cron expression, a service to call and an XML message request to send to the service.
{code:lang=xml}
You have to deploy a Service Unit with a JBI descriptor containing a consumes section and the parameters.
Here is a sample of a SU JBI descriptor to call a Hello service with <text>hello</text> message, at 10:15am every day during the year 2005 :
Here is a sample of a SU JBI descriptor to call a Hello service with <text>hello</text> message, at 10:15am every day during the year 2005 :
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<!-- JBI descriptor for PEtALS' "petals-se-quartz" (QUARTZ), version 1.0 -->
<jbi:jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi">
xmlns:quartz="http://petals.ow2.org/components/quartz/version-1.0"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
xmlns:generatedNs="http://petals.ow2.org/components/hello/version-3.0">
<!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. -->
<jbi:services binding-component="false">
<!-- Expose a PEtALS Service => consumes a Service. -->
<jbi:consumes
interface-name="generatedNs:Hello"
service-name="generatedNs:HelloSrv"
endpoint-name="HelloSrvEndpoint">
<!-- CDK specific elements -->
<petalsCDK:operation>sayHelloOperation</petalsCDK:operation>
<petalsCDK:mep>InOnly</petalsCDK:mep>
<!-- Component specific elements -->
<quartz:cron-expression>0 15 10 * * ? 2005</quartz:cron-expression>
<quartz:content><![CDATA[ <text>hello</text> ]]> </quartz:content>
</jbi:consumes>
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
xmlns:generatedNs="http://petals.ow2.org/components/hello/version-3.0">
<!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. -->
<jbi:services binding-component="false">
<!-- Expose a PEtALS Service => consumes a Service. -->
<jbi:consumes
interface-name="generatedNs:Hello"
service-name="generatedNs:HelloSrv"
endpoint-name="HelloSrvEndpoint">
<!-- CDK specific elements -->
<petalsCDK:operation>sayHelloOperation</petalsCDK:operation>
<petalsCDK:mep>InOnly</petalsCDK:mep>
<!-- Component specific elements -->
<quartz:cron-expression>0 15 10 * * ? 2005</quartz:cron-expression>
<quartz:content><![CDATA[ <text>hello</text> ]]> </quartz:content>
</jbi:consumes>
</jbi:services>
</jbi:jbi>
</jbi:jbi>