Petals CDK

Endpoints are activated before the component is ready to serve them

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 5.5.0
  • Fix Version/s: 5.6.0
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    According to the JBI specification (see 7.2.1.2 Endpoint Activation and Deactivation), the contract of the activateEndpoint operation is that an endpoint should be activated ONLY if the component is ready to answer requests.

    For SUs, currently, the endpoint is activated on deploy and not after init, which is the moment Petals components should be ready to answer requests for SUs.
    For native endpoints, they are activated during init, which is the moment components should be ready to answer native requests.

    We should thus change the moment we activate the endpoints: at the end of the init of their SU.
    Conversely, we should deactivate the endpoints before the component shutdown their SU.

    We should NOT change the moment we activate the native endpoints, because this is correct (activated when the component is not shutdown).

    This means also that we should fix the components that relied on the assumption that their endpoints (SU and native) were activated before init and after shutdown.
    And we should fix the components that are not ready to serve the messages (for SU and native endpoints) after init and before shutdown.
    The integration lifecycle test should be updated, and the hack handling exchange for non-started SUs in the Container Router can be safely removed.

    Show
    According to the JBI specification (see 7.2.1.2 Endpoint Activation and Deactivation), the contract of the activateEndpoint operation is that an endpoint should be activated ONLY if the component is ready to answer requests. For SUs, currently, the endpoint is activated on deploy and not after init, which is the moment Petals components should be ready to answer requests for SUs. For native endpoints, they are activated during init, which is the moment components should be ready to answer native requests. We should thus change the moment we activate the endpoints: at the end of the init of their SU. Conversely, we should deactivate the endpoints before the component shutdown their SU. We should NOT change the moment we activate the native endpoints, because this is correct (activated when the component is not shutdown). This means also that we should fix the components that relied on the assumption that their endpoints (SU and native) were activated before init and after shutdown. And we should fix the components that are not ready to serve the messages (for SU and native endpoints) after init and before shutdown. The integration lifecycle test should be updated, and the hack handling exchange for non-started SUs in the Container Router can be safely removed.
  • Environment:
    -

Issue Links

Activity

Hide
Victor NOËL added a comment - Tue, 5 Jan 2016 - 12:59:25 +0100

Updated the description to match new discussions: endpoints are activated just after init is executed and deactivated just before shutdown is executed.

Show
Victor NOËL added a comment - Tue, 5 Jan 2016 - 12:59:25 +0100 Updated the description to match new discussions: endpoints are activated just after init is executed and deactivated just before shutdown is executed.

People

Dates

  • Created:
    Thu, 29 Oct 2015 - 17:48:14 +0100
    Updated:
    Tue, 5 Jan 2016 - 12:59:25 +0100
    Resolved:
    Wed, 4 Nov 2015 - 13:37:12 +0100