Bufferize operations with EIP

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

Changes (31)

View Page History
h1. Configuring SE-EIP: Aggregator and Splitter patterns


h2. SE-EIP Aggregator Splitter
{code:lang=xml|title=jbi.xml}<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"
xmlns:eip="http://petals.ow2.org/components/eip/version-2"
<jbi:services binding-component="false">
<jbi:provides
interface-name="generatedNs:EipAggregatorInterface" interface-name="generatedNs:EipSplitterInterface"
service-name="generatedNs:EipAggregator" service-name="generatedNs:EipSplitter"
endpoint-name="EipAggregatorEndpoint"> endpoint-name="EipSplitterEndpoint">

<!-- CDK specific elements -->

<!-- Component specific elements -->
<eip:eip>aggregator</eip:eip> <eip:eip>splitter</eip:eip>
<eip:test>boolean(/*[local-name()="AddIntegers"]/*[local-name()="equals"])</eip:test>
<eip:aggregator-correlation>boolean(/*[local-name()="AddIntegers"])</eip:aggregator-correlation>
<eip:test>//*[local-name()="AddIntegers"]</eip:test>
<eip:fault-robust>false</eip:fault-robust>
<eip:exception-robust>false</eip:exception-robust>
</jbi:provides>

<!-- Consumed project 1 ( test = boolean(/*[local-name()="AddIntegers"]/*[local-name()="equals"]) ) -->
<!-- Consumed project 1 ( test = //*[local-name()="AddIntegers"] ) -->
<jbi:consumes
interface-name="iConsumeNsPrefix:EipSplitterInterface" interface-name="iConsumeNsPrefix:MyMathOperations"
service-name="iConsumeNsPrefix:EipSplitter" service-name="iConsumeNsPrefix:MyMathOperations"
endpoint-name="EipSplitterEndpoint" endpoint-name="MyMathOperationsPort"
xmlns:iConsumeNsPrefix="http://test.petalslink.com">

<!-- CK specific fields for this consume -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:operation xmlns:AnyOperationNameNs="http://test.petalslink.com">AnyOperationNameNs:AnyOperationName</petalsCDK:operation> xmlns:AddIntegersNs="http://test.petalslink.com">AddIntegersNs:AddIntegers</petalsCDK:operation>
<petalsCDK:mep>InOut</petalsCDK:mep>
</jbi:consumes>
</jbi:jbi>{code}

*Explanation of the Xpath operations (you can look at this great* *[Xpath tutorial|http://www.w3schools.com/XPath/default.asp]**)*


Retrieve elements inside the <AddIntegers> node :

{code:lang=xml}<eip:aggregator-correlation>boolean(/*[local-name()="AddIntegers"])</eip:aggregator-correlation>{code}

Triggers messages when receiving <equals/> in the node <AddIntegers> :

{code:lang=xml}<eip:test>boolean(/*[local-name()="AddIntegers"]/*[local-name()="equals"])</eip:test>{code}

h2. SE-EIP Splitter Aggregator
{code:lang=xml|title=jbi.xml}<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"
xmlns:eip="http://petals.ow2.org/components/eip/version-2"
<jbi:services binding-component="false">
<jbi:provides
interface-name="generatedNs:EipSplitterInterface" interface-name="generatedNs:EipAggregatorInterface"
service-name="generatedNs:EipSplitter" service-name="generatedNs:EipAggregator"
endpoint-name="EipSplitterEndpoint"> endpoint-name="EipAggregatorEndpoint">

<!-- CDK specific elements -->

<!-- Component specific elements -->
<eip:eip>splitter</eip:eip> <eip:eip>aggregator</eip:eip>
<eip:test>//*[local-name()="AddIntegers"]</eip:test>
<eip:test>boolean(/*[local-name()="AddIntegers"]/*[local-name()="equals"])</eip:test>
<eip:aggregator-correlation>boolean(/*[local-name()="AddIntegers"])</eip:aggregator-correlation>
<eip:fault-robust>false</eip:fault-robust>
<eip:exception-robust>false</eip:exception-robust>
</jbi:provides>

<!-- Consumed project 1 ( test = //*[local-name()="AddIntegers"] boolean(/*[local-name()="AddIntegers"]/*[local-name()="equals"]) ) -->
<jbi:consumes
interface-name="iConsumeNsPrefix:MyMathOperations" interface-name="iConsumeNsPrefix:EipSplitterInterface"
service-name="iConsumeNsPrefix:MyMathOperations" service-name="iConsumeNsPrefix:EipSplitter"
endpoint-name="MyMathOperationsPort" endpoint-name="EipSplitterEndpoint"
xmlns:iConsumeNsPrefix="http://test.petalslink.com">

<!-- CK specific fields for this consume -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:operation xmlns:AddIntegersNs="http://test.petalslink.com">AddIntegersNs:AddIntegers</petalsCDK:operation> xmlns:AnyOperationNameNs="http://test.petalslink.com">AnyOperationNameNs:AnyOperationName</petalsCDK:operation>
<petalsCDK:mep>InOut</petalsCDK:mep>
</jbi:consumes>
</jbi:jbi>{code}

*Explanation of the Xpath operations (you can look at this great* *[Xpath tutorial|http://www.w3schools.com/XPath/default.asp]**)*


Retrieve elements inside the <AddIntegers> node :

{code:lang=xml}<eip:aggregator-correlation>boolean(/*[local-name()="AddIntegers"])</eip:aggregator-correlation>{code}

Triggers messages when receiving <equals/> in the node <AddIntegers> :

{code:lang=xml}<eip:test>boolean(/*[local-name()="AddIntegers"]/*[local-name()="equals"])</eip:test>{code}

h1. Running the use case