Petals CDK

Native service endpoint must be registered/unregistered on component initialization/shutdown

Details

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

    As a rule, in Petals, an endpoint is registered on its deployment, and unregistered on its undeployment.

    So, the native service endpoint should be registered when installing the component because the installation is similar to a deployment. And it should be unregistered when uninstalling the component.

    But when installing the component, the component itself that is required to do endpoint registration (Component.getServiceDescription(...) is invoked by ComponentContext.activateEndpoint(...)) is not available yet. Only the component bootstrap is available.

    So, to have the native service endpoint registered the most time it must be registered on component initialization instead of component startup, and its unregistration must occur on component shutdown instead of component stop.

    Show
    As a rule, in Petals, an endpoint is registered on its deployment, and unregistered on its undeployment. So, the native service endpoint should be registered when installing the component because the installation is similar to a deployment. And it should be unregistered when uninstalling the component. But when installing the component, the component itself that is required to do endpoint registration (Component.getServiceDescription(...) is invoked by ComponentContext.activateEndpoint(...)) is not available yet. Only the component bootstrap is available. So, to have the native service endpoint registered the most time it must be registered on component initialization instead of component startup, and its unregistration must occur on component shutdown instead of component stop.
  • Environment:
    -

Activity

Christophe DENEUX made changes - Tue, 30 Sep 2014 - 17:01:30 +0200
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Major [ 3 ]
Christophe DENEUX made changes - Tue, 30 Sep 2014 - 17:08:18 +0200
Status Open [ 10002 ] In Progress [ 10003 ]
Christophe DENEUX made changes - Wed, 1 Oct 2014 - 09:30:29 +0200
Description Native service endpoint should be registered on component initialization instead of component startup, and the unregistration should occur on component shutdown instead of component stop. As a rule, in Petals, an endpoint is registered on its deployment, and unregistered on its undeployment.

So, the native service endpoint should be registered when installing the component because the installation is similar to a deployment. And it should be unregistered when uninstalling the component.

But when installing the component, the component itself that is required to do endpoint registration ({{Component.getServiceDescription(...)}} is invoked by {{ComponentContext.activateEndpoint(...)}}) is not available yet. Only the component bootstrap is available.

So, to have the native service endpoint registered the most time it must be registered on component initialization instead of component startup, and its unregistration must occur on component shutdown instead of component stop.
Christophe DENEUX made changes - Thu, 2 Oct 2014 - 14:39:04 +0200
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 5.5.0 [ 10406 ]
Resolution Fixed [ 1 ]

People

Dates

  • Created:
    Tue, 30 Sep 2014 - 17:01:12 +0200
    Updated:
    Thu, 2 Oct 2014 - 14:39:04 +0200
    Resolved:
    Thu, 2 Oct 2014 - 14:39:03 +0200