Features
It is relying on the Quartz open source project. This component only acts as a service consumer and doesn't act as a service provider. You use it to start another treatment managed by another service. For more details about Quartz usage, see url : http://www.quartz-scheduler.org/ |
Component Configuration
Service Configuration
Job scheduling
CONSUME SERVICE : Call a JBI service according to a time expression.
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 :
<?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>
| Parameter | Description | Default | Required |
|---|---|---|---|
| consumes | Refer JBI service to invoke into the JBI bus. You can define an explicit endpoint: interface (QName) / Service (QName) / Endpoint (String) attributes. Or define implicit endpoint, to let the container routing according to QOS configurations (HA...): -by Interface attribute (QName) -by Service attribute (QName) |
- | Yes |
| Parameter | Description | Default | Required |
|---|---|---|---|
| mep | Message exchange pattern abbreviation. This parameter can be used in conjunction with the method of the CDK Listeners: createMessageExchange(Extensions extensions). This method returns a CDK Exchange corresponding to the type of the specified pattern. |
- | Yes |
| operation | Operation to call on a service. This parameter can be used in conjunction with the sending methods of the Listeners. If no operation is specified in the Message Exchange to send, this parameter will be used. | - | No |
| timeout | Timeout in milliseconds of a synchronous send. This parameter can be used in conjunction with the sendSync(Exchange exchange) method of the Listeners. Set 0 for an infinite timeout. | 30000 | No |