|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (35)
View Page HistoryWhen deploying a service unit like in the following code snippet, all the files put in the directory {{$PETALS_HOME/filetransfer/in}} would be set as the payload of an invocation to the _ftContentNoBaseMsgService_ service.
h2. Configurations
h3. Service Unit descriptor
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 consumer implementation at CDK layer,
* *CDK interceptor parameters* that are parameters driving interceptors at CDK layer,
* *Dedicated parameters* that are parameters driving the service consumer implementation at component layer.
* *JBI parameters* that defines the service provider identification,
* *CDK parameters* that are parameters driving the service consumer implementation at CDK layer,
* *CDK interceptor parameters* that are parameters driving interceptors at CDK layer,
* *Dedicated parameters* that are parameters driving the service consumer implementation at component layer.
h3. CDK parameters defining service consumer implementation
The following parameters correspond to the CDK configuration of the service consumer implementation.
The following parameters correspond to the CDK configuration of the service consumer implementation.
*Example 1{*}*: use of the parameter* *transfer{*}*\-mode*
{include:0 CDK SU BC Consume Configuration 5.8.0}
h3. CDK parameters driving interceptors
The following parameters drive interceptors at CDK layer.
{include:0 CDK SU Interceptor configuration 5.8.0}
h3. Dedicated configuration
{table-plus}
|| Attribute || Description || Default Value || Required ||
| folder | Working directory where files are written or retrieved. $ \{myEnvVariable\} environment variables are supported. | {center}\-{center} | {center}Yes{center} |
| backup-directory | The directory where files are moved before being read.Environment variables are supported with the form $\{myEnvVariable\}. | {center}default system temporary directory {center} | {center}No{center} |
| polling-period | Polling period in milliseconds | {center}1000{center} | {center}No{center} |
| filename | Pattern used filter files to read | {center}\*{center} | {center}No{center} |
| transfer-mode | The mode of transfer of the received file(s) as message payload. \\
Accepted values : content, attachment. | {center}attachment{center} | {center}No{center} |
| base-message | The skeleton of XML-message to send to the consumed service. It may contain *$content* or *$attachment*, or none of them. This is the way the component should link the file with the returned message. \\
* *$content* will be replaced by the file content.
* *$attachment* will set the file in attachment. It will be replaced by a xop:include element which references the attachment (MTOM-like). | {center}\-{center} | {center}No{center} |
| external-processor-thread-pool-size | For each service-unit, the component create a poller. This parameter defines the maximum number of processor thread created by the poller to process incoming files until the service provider invocation. If no more processor thread is available, the associated incoming file to process will be postponed after the next polling period. | {center}5{center} | {center}No{center} |
| external-processor-thread-pool-timeout | Define the max wait time, in millisecond, to get a thread from the pool. If not possible, the associated incoming file to process will be postponed after the next polling period. | {center}10000ms{center} | {center}No{center} |
| external-processor-block-size | Define the number of incoming files processed concurrently in the sliding window, or '0' for no limitation. | {center}0{center} | {center}No{center} |
| external-processor-max-wait | Define the max waiting time, in millisecond, that an incoming file waits to enter in the sliding window. If it can't, its processing will be postponed after the next polling period. This parameter has no sens if external-processor-block-size is set to '0'. | {center}500ms{center} | {center}No{center} |
{table-plus}
{note}The parameter "transfer-mode" and "base-msg" can not be used at the same time.{note}
h3. Service unit content
The service unit has to contain the following elements, packaged in the archive:
* the META-INF/jbi.xml descriptor file as described above,.
{code}
service-unit.zip
+ META-INF
- jbi.xml (as defined above)
{code}
h3. Example
*Example 1*: use of the parameter *transfer-mode*
h3. CDK parameters driving interceptors
The following parameters drive interceptors at CDK layer.
{include:0 CDK SU Interceptor configuration 5.8.0}
h3. Dedicated configuration
{table-plus}
|| Attribute || Description || Default Value || Required ||
| folder | Working directory where files are written or retrieved. $ \{myEnvVariable\} environment variables are supported. | {center}\-{center} | {center}Yes{center} |
| backup-directory | The directory where files are moved before being read.Environment variables are supported with the form $\{myEnvVariable\}. | {center}default system temporary directory {center} | {center}No{center} |
| polling-period | Polling period in milliseconds | {center}1000{center} | {center}No{center} |
| filename | Pattern used filter files to read | {center}\*{center} | {center}No{center} |
| transfer-mode | The mode of transfer of the received file(s) as message payload. \\
Accepted values : content, attachment. | {center}attachment{center} | {center}No{center} |
| base-message | The skeleton of XML-message to send to the consumed service. It may contain *$content* or *$attachment*, or none of them. This is the way the component should link the file with the returned message. \\
* *$content* will be replaced by the file content.
* *$attachment* will set the file in attachment. It will be replaced by a xop:include element which references the attachment (MTOM-like). | {center}\-{center} | {center}No{center} |
| external-processor-thread-pool-size | For each service-unit, the component create a poller. This parameter defines the maximum number of processor thread created by the poller to process incoming files until the service provider invocation. If no more processor thread is available, the associated incoming file to process will be postponed after the next polling period. | {center}5{center} | {center}No{center} |
| external-processor-thread-pool-timeout | Define the max wait time, in millisecond, to get a thread from the pool. If not possible, the associated incoming file to process will be postponed after the next polling period. | {center}10000ms{center} | {center}No{center} |
| external-processor-block-size | Define the number of incoming files processed concurrently in the sliding window, or '0' for no limitation. | {center}0{center} | {center}No{center} |
| external-processor-max-wait | Define the max waiting time, in millisecond, that an incoming file waits to enter in the sliding window. If it can't, its processing will be postponed after the next polling period. This parameter has no sens if external-processor-block-size is set to '0'. | {center}500ms{center} | {center}No{center} |
{table-plus}
{note}The parameter "transfer-mode" and "base-msg" can not be used at the same time.{note}
h3. Service unit content
The service unit has to contain the following elements, packaged in the archive:
* the META-INF/jbi.xml descriptor file as described above,.
{code}
service-unit.zip
+ META-INF
- jbi.xml (as defined above)
{code}
h3. Example
*Example 1*: use of the parameter *transfer-mode*
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5" xmlns:providerNs="http://petals.ow2.org/filetransfer/my-provider"
xmlns:filetransfer="http://petals.ow2.org/components/filetransfer/version-5"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:wsdl="http://petals.ow2.org/filetransfer" xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:filetransfer="http://petals.ow2.org/components/filetransfer/version-5"
xmlns:jbi="http://java.sun.com/xml/ns/jbi" version="1.0">
xmlns:jbi="http://java.sun.com/xml/ns/jbi" version="1.0">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<jbi:services binding-component="false">
<jbi:consumes interface-name="wsdl:ftContentNoBaseMsg"
interface-name="providerNs:ftContentNoBaseMsg"
service-name="wsdl:ftContentNoBaseMsgService" service-name="providerNs:ftContentNoBaseMsgService"
endpoint-name="ftContentNoBaseMsgEndpoint">
<petalsCDK:timeout>20</petalsCDK:timeout>
<petalsCDK:mep>InOnly</petalsCDK:mep>
<petalsCDK:timeout>20</petalsCDK:timeout>
<petalsCDK:mep>InOnly</petalsCDK:mep>
<petalsCDK:operation>providerNs:simplefiletransfer</petalsCDK:operation>
<filetransfer:folder>${PETALS_HOME}/filetransfer/in</filetransfer:folder>
<filetransfer:polling-period>3000</filetransfer:polling-period>
<filetransfer:polling-period>3000</filetransfer:polling-period>
{code}
*Example 2 : use of the parameter base-msg*
*Example 2*: use of the parameter *base-msg*
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!-- JBI descriptor for the Petals' "petals-bc-filetransfer" component (FileTransfer). -->
<jbi:jbi version="1.0"
xmlns:providerNs="http://petals.ow2.org/filetransfer/my-provider"
xmlns:filetransfer="http://petals.ow2.org/components/filetransfer/version-5"
xmlns:generatedNs="http://petals.ow2.org/filetransfer" xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
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="true">
<!-- Expose a Petals Service => consumes a Service. -->
<jbi:consumes interface-name="itfNs:ftAttachmentBaseMsg"
interface-name="providerNs:ftAttachmentBaseMsg"
service-name="generatedNs:ftAttachmentBaseMsgService" endpoint-name="ftAttachmentBaseMsgEndpoint" service-name="providerNs:ftAttachmentBaseMsgService"
xmlns:itfNs="http://petals.ow2.org/filetransfer">
<!-- CDK specific elements -->
<!-- CDK specific elements -->
endpoint-name="ftAttachmentBaseMsgEndpoint">
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:mep>InOnly</petalsCDK:mep>
<petalsCDK:mep>InOnly</petalsCDK:mep>
<!-- Component specific elements -->
<petalsCDK:operation>providerNs:simplefiletransfer</petalsCDK:operation>
<filetransfer:folder>${PETALS_HOME}/filetransfer/in4</filetransfer:folder>
</filetransfer:folder>
<filetransfer:polling-period>1000</filetransfer:polling-period>
<filetransfer:base-message>
<filetransfer:base-message>
{code}
{include:0 CDK SU BC Consume Configuration 5.8.0}
{center}{*}Configuration of a Service Unit to consume a service (File Transfer)*
{center}
|| Attribute || Description || Default Value || Required ||
| folder | Working directory where files are written or retrieved. $ \{myEnvVariable\} environment variables are supported. | {center}\-{center} | {center}Yes{center} |
| backup-directory | The directory where files are moved before being read.Environment variables are supported with the form $\{myEnvVariable\}. | {center}default system temporary directory {center} | {center}No{center} |
| polling-period | Polling period in milliseconds | {center}1000{center} | {center}No{center} |
| filename | Pattern used filter files to read | {center}\*{center} | {center}No{center} |
| transfer-mode | The mode of transfer of the received file(s) as message payload. \\
Accepted values : content, attachment. | {center}attachment{center} | {center}No{center} |
| base-message | The skeleton of XML-message to send to the consumed service. It may contain *$content* or *$attachment*, or none of them. This is the way the component should link the file with the returned message. \\
* *$content* will be replaced by the file content.
* *$attachment* will set the file in attachment. It will be replaced by a xop:include element which references the attachment (MTOM-like). | {center}\-{center} | {center}No{center} |
| external-processor-thread-pool-size | For each service-unit, the component create a poller. This parameter defines the maximum number of processor thread created by the poller to process incoming files until the service provider invocation. If no more processor thread is available, the associated incoming file to process will be postponed after the next polling period. | {center}5{center} | {center}No{center} |
| external-processor-thread-pool-timeout | Define the max wait time, in millisecond, to get a thread from the pool. If not possible, the associated incoming file to process will be postponed after the next polling period. | {center}10000ms{center} | {center}No{center} |
| external-processor-block-size | Define the number of incoming files processed concurrently in the sliding window, or '0' for no limitation. | {center}0{center} | {center}No{center} |
| external-processor-max-wait | Define the max waiting time, in millisecond, that an incoming file waits to enter in the sliding window. If it can't, its processing will be postponed after the next polling period. This parameter has no sens if external-processor-block-size is set to '0'. | {center}500ms{center} | {center}No{center} |
{note}The parameter "transfer-mode" and "base-msg" can not be used at the same time.{note}
{center}{*}Configuration of a Service Unit to consume a service (File Transfer)*
{center}
|| Attribute || Description || Default Value || Required ||
| folder | Working directory where files are written or retrieved. $ \{myEnvVariable\} environment variables are supported. | {center}\-{center} | {center}Yes{center} |
| backup-directory | The directory where files are moved before being read.Environment variables are supported with the form $\{myEnvVariable\}. | {center}default system temporary directory {center} | {center}No{center} |
| polling-period | Polling period in milliseconds | {center}1000{center} | {center}No{center} |
| filename | Pattern used filter files to read | {center}\*{center} | {center}No{center} |
| transfer-mode | The mode of transfer of the received file(s) as message payload. \\
Accepted values : content, attachment. | {center}attachment{center} | {center}No{center} |
| base-message | The skeleton of XML-message to send to the consumed service. It may contain *$content* or *$attachment*, or none of them. This is the way the component should link the file with the returned message. \\
* *$content* will be replaced by the file content.
* *$attachment* will set the file in attachment. It will be replaced by a xop:include element which references the attachment (MTOM-like). | {center}\-{center} | {center}No{center} |
| external-processor-thread-pool-size | For each service-unit, the component create a poller. This parameter defines the maximum number of processor thread created by the poller to process incoming files until the service provider invocation. If no more processor thread is available, the associated incoming file to process will be postponed after the next polling period. | {center}5{center} | {center}No{center} |
| external-processor-thread-pool-timeout | Define the max wait time, in millisecond, to get a thread from the pool. If not possible, the associated incoming file to process will be postponed after the next polling period. | {center}10000ms{center} | {center}No{center} |
| external-processor-block-size | Define the number of incoming files processed concurrently in the sliding window, or '0' for no limitation. | {center}0{center} | {center}No{center} |
| external-processor-max-wait | Define the max waiting time, in millisecond, that an incoming file waits to enter in the sliding window. If it can't, its processing will be postponed after the next polling period. This parameter has no sens if external-processor-block-size is set to '0'. | {center}500ms{center} | {center}No{center} |
{note}The parameter "transfer-mode" and "base-msg" can not be used at the same time.{note}
h1. Configuring the component