Petals-SE-POJO 2.7.0+

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (36)

View Page History
where {{jbiListener}} is the JBI listener transmitted through methods {{onExchange(...)}}, {{onAsyncExchange(...)}} or {{onExpiredAsyncJBIMessage(...)}} of your POJO class.

h2. Service Configuration
h2. Service provider configuration

h3. Service Unit descriptor
The POJO used as service provider implementation is defined and configured in a service unit descriptor.

The POJO JBI descriptor must contain a {{Provides}} section for each POJO to expose in the JBI bus.
The POJO JBI descriptor must contain a {{Provides}} section for each POJO to expose, and it is recommend to add a {{Consumes}} section for each service provider invoked from the POJO service.

An example of the POJO SU:
h3. Configuration

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<!-- JBI descriptor for PEtALS' "petals-se-pojo" (POJO), version 2.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:pojo="http://petals.ow2.org/components/pojo/version-2.0"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
xmlns:generatedNs="http://POJO/test">
<!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. -->
<jbi:services binding-component="false">
<!-- Import a Service into PEtALS => provides a Service. -->
<jbi:provides
interface-name="generatedNs:POJO"
service-name="generatedNs:POJOService"
endpoint-name="POJOServiceEndpoint">
<!-- CDK specific elements -->
<petalsCDK:wsdl xsi:nil="true" />
<!-- Component specific elements -->
<pojo:class-name>test.SamplePojoService</pojo:class-name>
</jbi:provides>
</jbi:services>
</jbi:jbi>
{code}
All needed information must be defined in the service-unit JBI descriptor. This JBI descriptor is configured through parameters divided in following groups:
* *JBI parameters* that defines the service provider identification,
* *CDK parameters* that are parameters driving the service provider implementation at CDK layer,
* *CDK interceptor parameters* that are parameters driving interceptors at CDK layer,
* *Dedicated parameters* that are parameters driving the service provider implementation at component layer.

{include:0 CDK SU Provide Configuration 5.7.0}
\\
{table-plus}
h4. CDK parameters defining service provider implementation
The following parameters correspond to the CDK configuration of the service provider implementation.

{center}{*}Configuration of a Service Unit to provide a service (POJO)*{center}
{include:0 CDK SU Provide Configuration 5.8.0}

h4. CDK parameters driving interceptors
The following parameters drive interceptors at CDK layer.

{include:0 CDK SU Interceptor configuration 5.8.0}

h4. Dedicated configuration

{table-plus}
|| Parameter Attribute || Description || Default value || Required ||
| class-name | The name of the Java class to expose as a service. | {center}\-{center} | {center}Yes{center} |
{table-plus}

{include:0 CDK SU Interceptor configuration}
h4. Service Unit content

h3. Service Unit content
The POJO class(es) and their depending libraries must be set as JAR(s) file(s) at the root directory of the POJO service unit package.

The POJO class(es) and their depending libraries must be set as JAR(s) file(s) at the root directory of the POJO Service
Unit package.
The service unit must contain the following elements, packaged in the archive:
* the META-INF/jbi.xml descriptor file as described above,
* it is also highly recommended to provide a WSDL description for service provider embedded in the service-unit,
* at least one JAR containing the POJO class to expose.

The Service Unit must contain the following elements, packaged in an ZIP archive:
* The META-INF/jbi.xml descriptor file, has described above.
* At least one jar containing the POJO class to expose
{code}
service-unit.zip
+ META-INF
- jbi.xml (as defined above)
- jbi.xml mypojoclasses.jar (as defined above)
- mypojoclasses.jar
- service.wsdl (recommended)
{code}

h1. Component Configuration
h4. Example

{include:0 CDK Component Configuration Table 5.6.0}
{include:0 CDK Parameter scope}
{include:0 CDK Component Interceptor configuration}
An example of a Service Unit descriptor to provide a POJO service:
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:pojo="http://petals.ow2.org/components/pojo/version-2.0"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
xmlns:generatedNs="http://petals.ow2.org/pojo">

<jbi:services binding-component="false">

<jbi:provides endpoint-name="POJOServiceEndpoint"
interface-name="generatedNs:POJO" service-name="generatedNs:POJOService">

<!-- CDK specific elements -->
<petalsCDK:wsdl>MyFileTransferService.wsdl</petalsCDK:wsdl>
<petalsCDK:validate-wsdl>true</petalsCDK:validate-wsdl>

<!-- Component specific elements -->
<pojo:class-name>test.SamplePojoService</pojo:class-name>
</jbi:provides>
</jbi:services>
</jbi:jbi>
{code}

h1. Configuring the component

The component can be configured through the parameters of its JBI descriptor file. These parameters are divided in following groups:
* *JBI parameters* that have not to be changed otherwise the component will not work,
* *CDK parameters* that are parameters driving the processing of the CDK layer,
* *Dedicated parameters* that are parameters specific to this component.

h2. CDK parameters
The component configuration includes the configuration of the CDK. The following parameters correspond to the CDK configuration.

{include:0 CDK Component Configuration Table 5.8.0}

h2. Interception configuration
{include:0 CDK Component Interceptor configuration 5.8.0}

h2. Dedicated configuration

No dedicated configuration parameter is available.

h1. Monitoring the component

h2. Using metrics

Several probes providing metrics are included in the component, and are available through the JMX MBean '{{org.ow2.petals:type=custom,name=monitoring\_}}{{{}*<component-id>*}}', '{{org.ow2.petals:type=custom,name=monitoring_*<component-id>*}}', where {{*<component-id>*}} is the unique JBI identifier of the component.

h3. Common metrics

{include:0 CDK Component Monitoring Metrics 5.68.0}

h3. Dedicated metrics
h2. Receiving alerts

Several alerts are notified by the component through notification of the JMX MBean '{{org.ow2.petals:type=custom,name=monitoring\_}}{{{}*<component-id>*}}', '{{org.ow2.petals:type=custom,name=monitoring_*<component-id>*}}', where {{*<component-id>*}} is the unique JBI identifier of the component.

{tip}To integrate these alerts with Nagios, see [petalsesbsnapshot:Receiving Petals ESB defects in Nagios].{tip}

No dedicated alert is available.

h1. Business monitoring

h2. MONIT traces

{include:0 CDK SE Business Monitoring Traces 5.8.0}

h2. Flow tracing activation

{include:0 CDK SE Business Monitoring Flow Tracing Activation 5.8.0}

h2. Flow tracing propagation

{include:0 CDK SE Business Monitoring Flow Tracing Propagation 5.8.0}