|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (29)
View Page History{column}
h1. Features
{petalslink:author=llacote|type=FIXME SECTION À RELIRE ET COMPLÉTER}{petalslink}
The POJO (Plain Old Java Object) component is a Service Engine (SE) which allows to expose your own Java classes as Services. It is useful to refactor your own Business logic as services.
The POJO (Plain Old Java Object) component is a Service Engine (SE) which allows to expose your own Java classes as Services. It is useful to refactor your own Business logic as services.
The POJO (Plain Old Java Object) component is a Service Engine (SE) that provides services that you can develop directly in Java code.
It can be useful to refactor your legacy code as Business logic with this component, or build simple hand made services.
Each POJO service is represented by a provides {{Provides}} section in a POJO Service Unit.
This component provides only services and doesn't act as a consumer of service.
This component do not support the CDK {{Consumes}} mode directly. However, it can consume 'sub-services' during the providing of a service, eg an hand made service of orchestration.
This component is based on the PEtALS CDK.
h1. Exposing a Java class as a POJO service (Provides mode)
PROVIDE SERVICE : Expose a Java class as a Service
h2. Usage
{petalslink:author=llacote|type= Note : Titre du PDF d'où est importée cette section : Chapter 3. POJO Services Specifications}{petalslink}
A Java class acting as a POJO service must follow these rules :
A Java class acting as a POJO service must follow these rules :
The POJO that you want to develop must follow certain constraints :
* no specific interface implementation is required.
* if a {{public setComponentContext(ComponentContext context)}} setter method is defined, the component set its {{ComponentContext}} instance with this method at the initialization of the POJO.
* if a {{public setDeliveryChannel(DeliveryChannel channel)}} setter method is defined, the component set its {{DeliveryChannel}} instance with this method at the initialization of the POJO.
* if a {{public setJBIListener(AbstractJBIListener jbiListener)}} setter method is defined, the component set its {{JBIListener}} instance with this method at the initialization of the POJO.
* if a {{public setLogger(Logger logger)}} setter method is defined, the component set its {{Logger instance}} with this
* if a {{public setJBIListener(AbstractJBIListener jbiListener)}} setter method is defined, the component set its {{JBIListener}} instance with this method at the initialization of the POJO.
* if a {{public setLogger(Logger logger)}} setter method is defined, the component set its {{Logger instance}} with this
method at the initialization of the POJO.
* if a {{public void init()}} method is defined, the compenent invoke it at the initialization of the POJO.
* a {{public boolean onExchange(Exchange exchange)}} MUST be provided.
* a {{public boolean onExchange(Exchange exchange)}} MUST be provided.
{center}{*}Configuration of a Service Unit to provide a service (JBI)*{center}
{table-plus:columnAttributes=,,style="text-align:center;",style="text-align:center;"}
{table-plus:columnAttributes=,,style="text-align:center;",style="text-align:center;"}
|| {color:#333333}Parameter{color} || {color:#333333}Description{color}\\ || {color:#333333}Default{color}\\ || {color:#333333}Required{color}\\ ||
| provides | Describe the JBI service that will be exposed into the JBI bus. Interface (QName), Service (QName) and Endpoint (String) attributes are required. | \- | Yes |
\\
{table-plus:columnAttributes=,,style="text-align:center;",style="text-align:center;"}
{table-plus}
|| {color:#333333}Parameter{color} || {color:#333333}Description{color}\\ || {color:#333333}Default{color}\\ || {color:#333333}Required{color}\\ ||
| timeout | Timeout in milliseconds of a synchronous send. This parameter is used by the method {{sendSync}} (Exchange exchange) proposes by the CDK {{Listeners}} classes. \\
| timeout | Timeout in milliseconds of a synchronous send. This parameter is used by the method {{sendSync}} (Exchange exchange) proposes by the CDK {{Listeners}} classes. \\
If not specified, a basic WSDL description is automaticaly provided by the CDK. | | No |
| wsdl-imports-download | If false, the external imports declared in the service WSDL won't be downloaded, so they won't be replaced by their content. | true | No |
| wsdl-imports-download | If false, the external imports declared in the service WSDL won't be downloaded, so they won't be replaced by their content. | true | No |
| org.ow2.petals.messaging.provider.noack | Check PEtALS container document for further details. This propety activates the bypass of acknowledgment messages destinated to this SU. | \- | No |
{table-plus}
{petalslink}{include:0 CDK SU Provide Configuration}{petalslink}
{petalslink}{include:0 CDK SU Provide Configuration}{petalslink}
{center}{*}Configuration of a Service Unit to provide a service (POJO)*{center}
{table-plus:columnAttributes=,,style="text-align:center;",style="text-align:center;"}
{table-plus:columnAttributes=,,style="text-align:center;",style="text-align:center;"}
|| Parameter \\ || Description || Default value || Required ||
| class-name \\ | The name of the Java class to expose as a service. \\ | \- \\ | Yes \\ |
{table-plus}
h3. Service Unit descriptor
{table-plus}
h3. Service Unit descriptor
The POJO class(es) and their depending libraries must be set in JAR(s) file(s) at the root directory of the POJO Service
Unit package.
Unit package.
h1. Component Configuration
The following attributes can be set during the installation phase to configure the component, using the params element of the jbi-install-component ANT task:
{table-plus:columnAttributes=,,style="text-align:center;",style="text-align:center;",style="text-align:center;"}
|| {color:#333333}Parameter{color} || {color:#333333}Description{color} || {color:#333333}Default{color} || {color:#333333}Required{color} || {color:#333333}Required{color} ||
| acceptor-pool-size | The size of the thread pool used to accept Message Exchanges from the NMR. Once a message is accepted, its processing is delegated to the processor pool thread. | 3 | Yes | Runtime |
| acceptor-pool-size | The size of the thread pool used to accept Message Exchanges from the NMR. Once a message is accepted, its processing is delegated to the processor pool thread. | 3 | Yes | Runtime |
{note}Only for Binding Components{note} | \- | No | Component |
| jbi-listener-class-name | Qualified name of the class extending *AbstractJBIListener* | \- | Yes | Component |
| jbi-listener-class-name | Qualified name of the class extending *AbstractJBIListener* | \- | Yes | Component |
| performance-notifications | Enable the performance notifications in the component. The CDK proposes to a performance notification feature to the component implementor. If you enable this feature, you must use the related\\
method accessible in the {{AbstractComponent}} class. | \- | No | Runtime |
| performance-step | When the performance notification feature is enabled, it is possible to define a step on the notifications. When there is an heavy message traffic, it is recommanded to increase this step to\\
avoid performance disturbance. | \- | No | Runtime |
{table-plus}
{petalslink}{include:0 CDK Component Configuration Table}{petalslink}
{petalslink}{include:0 CDK Component Configuration Table}{petalslink}
{petalslink}{include:0 CDK Parameter scope}{petalslink}
{column}
{column:width=25%}
{column:width=25%}
{panel:title=Contributors}{contributors:order=name|mode=list}{panel}
{column}
{column}
{section}