
\\ !petals-studio-tuto-consumes-quartz-6.jpg!
\\
Click *Finish* to complete the wizard.
h2. Checking the result
When the wizard has completed, a new project has been created and is visible in your workspace.
It contains a jbi.xml file, located under *src/main/jbi*.
This hierarchy allows you to work with Apache Maven then (a pom.xml was also created at the root of the project).
There is nothing else in the project.
\\ !petals-studio-tuto-consumes-quartz-7.jpg!
h1. Updating, packaging and deploying
h2. Further edition and packaging
After completion, the newly created jbi.xml file has been open in the Service-Unit editor.
Regarding Quartz configurations, the wizards are complete and provide all the options.
Thus, you do not need to edit the jbi.xml.
However, if you need to update it manually, be careful: the XML message must be contained in a CDATA section.
Here is a sample configuration of the Quartz component.
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBI descriptor for the Petals' "petals-se-quartz" component (Quartz).
Originally created for the version 1.1 of the component.
-->
<jbi:jbi version="1.0"
xmlns:gen0="http://petals.ow2.org/components/hello/version-3.0"
xmlns:generatedNs="http://petals.ow2.org"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:quartz="http://petals.ow2.org/components/quartz/version-1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- 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:HotelInterface"
service-name="generatedNs:HotelService"
endpoint-name="HotelEndpoint">
<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:operation>gen0:sayHelloOperation</petalsCDK:operation>
<petalsCDK:mep>InOnly</petalsCDK:mep>
<!-- Component specific elements -->
<quartz:cron-expression>0 0 12 * * ? </quartz:cron-expression>
<quartz:content><![CDATA[<!-- Put the XML message to send here -->
<text>hello</text>]]></quartz:content>
</jbi:consumes>
</jbi:services>
</jbi:jbi>
{code}
\\
The project contains everything the Quartz component needs.
You can now package it before deploying it.
\\
The created project being a [Service-Unit project|Working with Service-Unit projects], you can [package it as any Service-Unit project|Working with Service-Unit projects#Export for Petals].
It results in the creation of a Service Assembly for the Petals-SE-Quartz component. Its location depends on your export choices.
h2. Deployment
The deployment of the created service assembly can be achieved with the Petals web console.
Or you can do it by dropping the service assembly in the *install* directory of your Petals installation.
This second option should only be used in development steps.
\\
First, make sure the Petals-SE-Quartz is installed in your Petals environment.
Then, install the service assembly in your Petals, using one of the two ways indicated above.
\\
There is no need to update configuration of the Quartz component to make it work.
Using the default settings is enough to make the service-unit work.