Petals SE EIP

Dispatcher pattern uncoherent behavior in Integration test case

Details

  • Type: Bug Bug
  • Status: New New
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.5
  • Fix Version/s: None
  • Component/s: Dispatcher
  • Security Level: Public
  • Description:
    Hide

    An DONE for ACKNOLEDGMENT was returned during integration test case instead ERROR,for Test 8 RobustInOnly dispatcher with a fault and faultToException.

    This integration test case with Dispatcher pattern expect an ERROR because a exception must be returned by the EIP dispatcher pattern with "faultToException" policy.

    In this test the RMIComponentContext_EIP_1 running Test8 send message with IN_ONLY mep. The EIP Component dispatches the incoming IN message toward the configured 'sub-services' in Consumes sections (here RMIComponentContext_EIP_2 and RMIComponentContext_EIP_3).

    The RMIComponentContext_EIP_2 receive from the dispatcher the exchange of Test 8 with RobustInOnly mep and return DONE
    The RMIComponentContext_EIP_2 wait the incoming message of Test 9.

    An integration exception was generated because expected ACK is ERROR and the ACK recovered was DONE ...

    After that the RMIComponentContext_EIP_3 receive from the dispatcher the exchange of Test 8 with mep RobustInOnly
    and wait the incoming message of Test 9

    I think a timeout can be reached or another cause occurred, before the RMIComponentContext_EIP_3 receive the dispatched message and the expected Fault wasn't set, the EIP Component can't generate the Exception from a Fault because status was setted to DONE by the RMIComponentContext_EIP_2.

    Show
    An DONE for ACKNOLEDGMENT was returned during integration test case instead ERROR,for Test 8 RobustInOnly dispatcher with a fault and faultToException. This integration test case with Dispatcher pattern expect an ERROR because a exception must be returned by the EIP dispatcher pattern with "faultToException" policy. In this test the RMIComponentContext_EIP_1 running Test8 send message with IN_ONLY mep. The EIP Component dispatches the incoming IN message toward the configured 'sub-services' in Consumes sections (here RMIComponentContext_EIP_2 and RMIComponentContext_EIP_3). The RMIComponentContext_EIP_2 receive from the dispatcher the exchange of Test 8 with RobustInOnly mep and return DONE The RMIComponentContext_EIP_2 wait the incoming message of Test 9. An integration exception was generated because expected ACK is ERROR and the ACK recovered was DONE ... After that the RMIComponentContext_EIP_3 receive from the dispatcher the exchange of Test 8 with mep RobustInOnly and wait the incoming message of Test 9 I think a timeout can be reached or another cause occurred, before the RMIComponentContext_EIP_3 receive the dispatched message and the expected Fault wasn't set, the EIP Component can't generate the Exception from a Fault because status was setted to DONE by the RMIComponentContext_EIP_2.
  • Environment:
    Hide
    The environment where the bug can be reproduce is the petals-se-eip project in petals-integration, get the attachments file in order to install the best environment to reproduce the problem. The test 8 is replicate several times in integration1.xml integration2.xml integration3.xml

    RMI client log can be read in petals-se-eip-integration-out.txt, and petals container log can be read in petals.log file.
    The study of the test case, suppositions, description test case, conclusion ... can be view in test-case-study.pdf attached file.
    I also provide a RMIClient for integration and an EIP component with more log
    Show
    The environment where the bug can be reproduce is the petals-se-eip project in petals-integration, get the attachments file in order to install the best environment to reproduce the problem. The test 8 is replicate several times in integration1.xml integration2.xml integration3.xml RMI client log can be read in petals-se-eip-integration-out.txt, and petals container log can be read in petals.log file. The study of the test case, suppositions, description test case, conclusion ... can be view in test-case-study.pdf attached file. I also provide a RMIClient for integration and an EIP component with more log
  1. build.xml
    (19 kB)
    Adrien Ruffie
    Wed, 13 Apr 2011 - 14:39:01 +0200
  2. integration1.xml
    (39 kB)
    Adrien Ruffie
    Wed, 13 Apr 2011 - 14:34:50 +0200
  3. integration2.xml
    (34 kB)
    Adrien Ruffie
    Wed, 13 Apr 2011 - 14:34:50 +0200
  4. integration3.xml
    (26 kB)
    Adrien Ruffie
    Wed, 13 Apr 2011 - 14:34:50 +0200
  5. petals-se-eip-2.6-SNAPSHOT.zip
    (6.70 MB)
    Adrien Ruffie
    Wed, 13 Apr 2011 - 14:39:01 +0200
  6. petals-se-eip-integration-out.txt
    (67 kB)
    Adrien Ruffie
    Wed, 13 Apr 2011 - 14:34:13 +0200
  7. petals.log
    (528 kB)
    Adrien Ruffie
    Wed, 13 Apr 2011 - 14:34:13 +0200
  8. RMIClient.java
    (46 kB)
    Adrien Ruffie
    Wed, 13 Apr 2011 - 14:39:01 +0200
  9. test-case-study.PDF
    (158 kB)
    Adrien Ruffie
    Wed, 13 Apr 2011 - 14:34:13 +0200
  10. wait.patch
    (3 kB)
    Christophe DENEUX
    Fri, 15 Apr 2011 - 14:12:25 +0200

Activity

Hide
Adrien Ruffie added a comment - Wed, 13 Apr 2011 - 14:41:35 +0200

Run a petals container, place yourself at petalslink/integration/petals-integration/tests/petals-se-eip and
after that execute the followinf maven command in order to run EIP tests:

mvn antrun:run -Dpetals.integration.command=all

Show
Adrien Ruffie added a comment - Wed, 13 Apr 2011 - 14:41:35 +0200 Run a petals container, place yourself at petalslink/integration/petals-integration/tests/petals-se-eip and after that execute the followinf maven command in order to run EIP tests: mvn antrun:run -Dpetals.integration.command=all
Hide
Christophe DENEUX added a comment - Fri, 15 Apr 2011 - 10:49:29 +0200

The test 8 invokes the dispatcher that forwards the request to SE RMI 2 and SE RMI 3. SE RMI 2 returns a DONE status and SE RMI 3 returns a fault.
I think that the problem is linked to:

  • the expected replies order. SE RMI 2 is wait before SE RMI 3. But as the dispatcher is asynchronous the replies are received without order,
  • the dispatcher returns only a message based on the last received reply: functions are missing at the dispatcher level to define which reply must be returned according received replies.

To fix the problem:

  • add a new tag in integration test to define a sleep period before to send the reply at provider level (so the received replies order can be defined)
  • improve the dispatcher against reply to return according received replies
  • add integration tests about dispatcher enhancement.
Show
Christophe DENEUX added a comment - Fri, 15 Apr 2011 - 10:49:29 +0200 The test 8 invokes the dispatcher that forwards the request to SE RMI 2 and SE RMI 3. SE RMI 2 returns a DONE status and SE RMI 3 returns a fault. I think that the problem is linked to:
  • the expected replies order. SE RMI 2 is wait before SE RMI 3. But as the dispatcher is asynchronous the replies are received without order,
  • the dispatcher returns only a message based on the last received reply: functions are missing at the dispatcher level to define which reply must be returned according received replies.
To fix the problem:
  • add a new tag in integration test to define a sleep period before to send the reply at provider level (so the received replies order can be defined)
  • improve the dispatcher against reply to return according received replies
  • add integration tests about dispatcher enhancement.
Hide
Christophe DENEUX added a comment - Fri, 15 Apr 2011 - 14:12:25 +0200

Patch to add a tag to wait before seding a reply at the provider level of the RMIClient

Show
Christophe DENEUX added a comment - Fri, 15 Apr 2011 - 14:12:25 +0200 Patch to add a tag to wait before seding a reply at the provider level of the RMIClient
Hide
Adrien Ruffie added a comment - Sat, 16 Apr 2011 - 07:04:19 +0200

I think this scenario may prove to obtain a new update:

One a way to specify a advanced behavior (a kind of extension) of a pattern.

For example the previous problem was the "Dispatcher" is not supposed to aggregate the answers returned by several "Performers".

Shouldn't we provide a mechanism allowing by one parameter to force the aggregation of responses?

The mechanism would be possible in each pattern to specify a palliative solution

Show
Adrien Ruffie added a comment - Sat, 16 Apr 2011 - 07:04:19 +0200 I think this scenario may prove to obtain a new update: One a way to specify a advanced behavior (a kind of extension) of a pattern. For example the previous problem was the "Dispatcher" is not supposed to aggregate the answers returned by several "Performers". Shouldn't we provide a mechanism allowing by one parameter to force the aggregation of responses? The mechanism would be possible in each pattern to specify a palliative solution
Hide
Adrien Ruffie added a comment - Sat, 16 Apr 2011 - 09:43:31 +0200

for example take a look for the following jbi Dispatcher descriptor:

<?xml version="1.0"?>

<!-- JBI descriptor for the PEtALS component "EIP" -->
<jbi:jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:eip="http://petals.ow2.org/components/eip/version-2"
xmlns:test="http://petals.ow2.org/test">

<jbi:services binding-component="false">
<jbi:provides
interface-name="test:dispatcher"
service-name="test:dispatcherService1"
endpoint-name="dispatcherService1Endpoint">
<petalsCDK:wsdl xsi:nil="true" />
<eip:eip>dispatcher</eip:eip>
<eip:extendedBehavior>enforceAggregatingResponses</eip:extendedBehavior>
</jbi:provides>

<jbi:consumes
interface-name="test:dispatcherProvider"
service-name="test:dispatcherProviderService1"
endpoint-name="dispatcherProviderService1Endpoint">
<petalsCDK:mep>InOnly</petalsCDK:mep>
<petalsCDK:operation xmlns:petals="http://org.ow2.petals">petals:operation</petalsCDK:operation>
</jbi:consumes>

<jbi:consumes
interface-name="test:dispatcherProvider"
service-name="test:dispatcherProviderService2"
endpoint-name="dispatcherProviderService2Endpoint">
<petalsCDK:mep>InOnly</petalsCDK:mep>
<petalsCDK:operation xmlns:petals="http://org.ow2.petals">petals:operation</petalsCDK:operation>
</jbi:consumes>
</jbi:services>
</jbi:jbi>

Show
Adrien Ruffie added a comment - Sat, 16 Apr 2011 - 09:43:31 +0200 for example take a look for the following jbi Dispatcher descriptor: <?xml version="1.0"?> <!-- JBI descriptor for the PEtALS component "EIP" --> <jbi:jbi version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jbi="http://java.sun.com/xml/ns/jbi" xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5" xmlns:eip="http://petals.ow2.org/components/eip/version-2" xmlns:test="http://petals.ow2.org/test"> <jbi:services binding-component="false"> <jbi:provides interface-name="test:dispatcher" service-name="test:dispatcherService1" endpoint-name="dispatcherService1Endpoint"> <petalsCDK:wsdl xsi:nil="true" /> <eip:eip>dispatcher</eip:eip> <eip:extendedBehavior>enforceAggregatingResponses</eip:extendedBehavior> </jbi:provides> <jbi:consumes interface-name="test:dispatcherProvider" service-name="test:dispatcherProviderService1" endpoint-name="dispatcherProviderService1Endpoint"> <petalsCDK:mep>InOnly</petalsCDK:mep> <petalsCDK:operation xmlns:petals="http://org.ow2.petals">petals:operation</petalsCDK:operation> </jbi:consumes> <jbi:consumes interface-name="test:dispatcherProvider" service-name="test:dispatcherProviderService2" endpoint-name="dispatcherProviderService2Endpoint"> <petalsCDK:mep>InOnly</petalsCDK:mep> <petalsCDK:operation xmlns:petals="http://org.ow2.petals">petals:operation</petalsCDK:operation> </jbi:consumes> </jbi:services> </jbi:jbi>
Hide
Christophe DENEUX added a comment - Mon, 18 Apr 2011 - 10:43:33 +0200 - edited

Today, the dispatcher closes its incoming exchange on the first outgoing dispatched exchange closed. That has no sens. The incoming exchange should be closed by the pattern itself after to have forwarded the request. Or, as mentionned by adrien, the incoming exchange should be closed aggregating all responses

Show
Christophe DENEUX added a comment - Mon, 18 Apr 2011 - 10:43:33 +0200 - edited Today, the dispatcher closes its incoming exchange on the first outgoing dispatched exchange closed. That has no sens. The incoming exchange should be closed by the pattern itself after to have forwarded the request. Or, as mentionned by adrien, the incoming exchange should be closed aggregating all responses
Hide
Adrien Ruffie added a comment - Mon, 18 Apr 2011 - 10:51:22 +0200

Hum ... I'm not sure that Dispatcher pattern must aggregates all response results (in specificationj dispatcher pattern), I'll watch it tonight. But just for information I think the Resequencer pattern mechanism can be a good track

Show
Adrien Ruffie added a comment - Mon, 18 Apr 2011 - 10:51:22 +0200 Hum ... I'm not sure that Dispatcher pattern must aggregates all response results (in specificationj dispatcher pattern), I'll watch it tonight. But just for information I think the Resequencer pattern mechanism can be a good track
Hide
Adrien Ruffie added a comment - Tue, 19 Apr 2011 - 13:59:28 +0200

I looked at home last night and I found we can certainly aggregate performers returns with Transaction aspect, because transaction is a part of Dispatcher specification, but isn't really recommended

Show
Adrien Ruffie added a comment - Tue, 19 Apr 2011 - 13:59:28 +0200 I looked at home last night and I found we can certainly aggregate performers returns with Transaction aspect, because transaction is a part of Dispatcher specification, but isn't really recommended

People

Dates

  • Created:
    Wed, 13 Apr 2011 - 14:33:22 +0200
    Updated:
    Thu, 31 Jan 2019 - 10:55:26 +0100