Details

      Description

      Document how to wait for lifecycle events (e.g., Portal initialization) and services to become available (service dependencies).

      For example, here's how to invoke an action once portal has been initialized and particular services are available (e.g., DDMStructureLocalService) ...

      1. Create a DS Component (@Component).
      2. Create a method to invoke as your "action" and annotate it with @Activate.
      3. Add @Reference to fields to hold the services.
      4. Add the following field to depend on Portal's initialization

      @Reference(target = ModuleServiceLifecycle.PORTAL_INITIALIZED)
      {{private ModuleServiceLifecycle moduleServiceLifecycle; }}

      In addition to the portal init event, ModuleServiceLifecycle has database and spring init events.

      Once the services are available and Portal initializes, your @Activate method invokes.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  7.0.x
                  7.1.x