Skip to content

Commit

Permalink
Change order of activation of the notification facade. Facade must be…
Browse files Browse the repository at this point in the history
… ready before resources are starting to allow publish notification during OnStart().
  • Loading branch information
dacky179 committed Apr 30, 2024
1 parent c9835a1 commit 053fdc8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ protected override void OnInitialize()
/// </summary>
protected override void OnStart()
{
ActivateFacade(_notificationSourceFacade);

// Start type controller for resource and proxy creation
Container.Resolve<IResourceTypeController>().Start();

Expand All @@ -106,7 +108,6 @@ protected override void OnStart()
resourceManager.Start();

// Activate external facade to register events
ActivateFacade(_notificationSourceFacade);
ActivateFacade(_resourceManagementFacade);
}

Expand All @@ -116,11 +117,12 @@ protected override void OnStart()
protected override void OnStop()
{
// Tear down facades
DeactivateFacade(_notificationSourceFacade);
DeactivateFacade(_resourceManagementFacade);

var resourceManager = Container.Resolve<IResourceManager>();
resourceManager.Stop();

DeactivateFacade(_notificationSourceFacade);
}

private readonly ResourceManagementFacade _resourceManagementFacade = new ResourceManagementFacade();
Expand Down

0 comments on commit 053fdc8

Please sign in to comment.