Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-209

Move features globalInit() tasks to PolicyEngine.afterStart()

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Low Low
    • Beijing Release
    • None
    • None
    • Policy Sprint 6 - 9/21-9/28

      The feature-session-persistence, feature-state-management and feature-active-standby globalInit() functions initializes infrastructure such as the DroolsPdpIntegrityMonitor before the topic endpoints and controllers are up. This has the potential of causing issues in the future if a dependency ever exists on those infrastructure elements.  To avoid any issue, the initialization code should be moved to PolicyEngine.afterStart().

      Then, you can remove the dependency on policy-core and remove the PolicySessionFeatureAPI implementation.

      Care should be taken to assign sequence numbers so that the correct order of initialization is maintained between the feature-state-management and feature-active-standby-management.

      Note that an instance of PolicyEngine is required on the call to afterStart().  In the JUnit implementation this can be accomplished by either creating a dummy PolicyEngine instance or passing PolicyEngine.manager to the method. See feature-eelf JUnits for example.

            km097d km097d
            km097d km097d
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d