Petals ESB Container

Implementation of MessageExchange does not respect owner contract

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 4.2.4
  • Fix Version/s: 5.0.0
  • Component/s: Micro-kernel
  • Security Level: Public
  • Description:
    Hide

    Operations on MessageExchange should throw IllegalStateException when a component that does not own the exchange in the current state calls them.

    The bug is caused by the fact that MessageExchangeWrapper, which is responsible of doing that check, is shared between consumer and provider and thus doesn't reflect correctly the role of the owner of a reference to the message as it should.
    (The code was actually documented as doing that, even though it wasn't, until commit r37114 where I corrected the documentation without realising the code should be fixed instead .

    A solution is to actually have 2 instances of the MessageExchangeWrapper, one for each actor of the exchange, so that their observerRole field actually reflect the reality.

    The problem is that many code in the kernel relies on the fact that the object is shared between the consumer and the provider.

    Show
    Operations on MessageExchange should throw IllegalStateException when a component that does not own the exchange in the current state calls them. The bug is caused by the fact that MessageExchangeWrapper, which is responsible of doing that check, is shared between consumer and provider and thus doesn't reflect correctly the role of the owner of a reference to the message as it should. (The code was actually documented as doing that, even though it wasn't, until commit r37114 where I corrected the documentation without realising the code should be fixed instead . A solution is to actually have 2 instances of the MessageExchangeWrapper, one for each actor of the exchange, so that their observerRole field actually reflect the reality. The problem is that many code in the kernel relies on the fact that the object is shared between the consumer and the provider.
  • Environment:
    -

Issue Links

Activity

People

Dates

  • Created:
    Thu, 23 Apr 2015 - 10:45:44 +0200
    Updated:
    Wed, 29 Jul 2015 - 10:54:33 +0200
    Resolved:
    Mon, 27 Jul 2015 - 16:05:56 +0200