
\\
{include:0 CDK Component Configuration Table}
h1. Service Configuration
h3. Job scheduling
CONSUME SERVICE : Call a JBI service according to a time expression.
h3. Service Unit Descriptor
The Quartz component is configured with a cron expression, a service to call and an XML message request to send to the service.
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 :
{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: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>
</jbi:services>
</jbi:jbi>
{code}