PEtALS-SE-Helloworld 2.0
This document explain how to install configure and use the petals-se-helloworld JBI component.
PEtALS Team Christophe Hamerling
- July 2007 -
(CC) EBM WebSourcing - This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/
PEtALS-SE-Helloworld
Table of Contents
PEtALS-SE-HELLOWORLD .................................................................................................................... 1. Features ............................................................................................................................................. 2. Service Configuration ........................................................................................................................... 2.1. Saying hello to the world ........................................................................................................... 2.1.1. Service Unit descriptor .................................................................................................... 3. Samples ............................................................................................................................................. 5 6 7 7 7 8
PEtALS-SE-Helloworld
2
PEtALS-SE-Helloworld
List of Figures
2.1. Provides Helloworld service ............................................................................................................... 7
PEtALS-SE-Helloworld
3
PEtALS-SE-Helloworld
List of Tables
2.1. service-unit attributes to provide services .............................................................................................. 7
PEtALS-SE-Helloworld
4
PEtALS-SE-HELLOWORLD
PEtALS-SE-HELLOWORLD
The Helloworld component is a sample of simple JBI service engine. The current component version (1.4) is based on the PEtALS Component Development Kit (also CDK) 2.0.
PEtALS-SE-Helloworld
5
Features
Chapter 1. Features
When the helloworld component starts, it registers and activates an endpoint in the JBI context. By default, the endpoint name is randomly generated (time based value) like 'HelloworldEndpoint1184325182794' in order to allow multiple component installation on multiple containers. The service QName is '{http://petals.objectweb.org/ }HelloworldService'. Two operations are provided by the endpoint: • printMessage: prints the incoming JBI message on the system terminal • sayHello: sends back the incoming JBI message prefixed by a greeting message
PEtALS-SE-Helloworld
6
Service Configuration
Chapter 2. Service Configuration
Since the Helloworld component is based on the CDK framework, you can easily deploy service units which will activate new JBI endpoints. This can be helpful since the component automatically activates randomly generated endpoint names at component startup.
2.1. Saying hello to the world
PROVIDE SERVICE : Expose helloworld operation to consumers
Figure 2.1. Provides Helloworld service
2.1.1. Service Unit descriptor
Table 2.1. service-unit attributes to provide services
Attribute provides Description Name of the JBI service that will be activated to expose helloworld into the JBI environment. interface (qname), service (qname) and endpoint (string) name are required. Default Required Yes
PEtALS-SE-Helloworld
7
Samples
Chapter 3. Samples
See the following Service Assemblies samples that illustrate the configuration of this component : • Providing a service : LINK TODO
PEtALS-SE-Helloworld
8