Uploaded image for project: 'Modular Service Container'
  1. Modular Service Container
  2. MSC-202

Provide alternative for deprecated ServiceListener

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 1.2.9.Final, 1.3.0.Final
    • None
    • None
    • None

      ServiceListeners have been deprecated long time ago but there's no suitable
      alternative available yet to cover use cases still present in WildFly code base.
      ServiceListener was deprecated for two reasons:

      • it exposes state machine implementation details to the users
      • it causes non zero performance overheads

      However there are still valid requirements for service notifications when service enters one of UP, DOWN, FAILED or REMOVED state.
      Proposed solution is to introduce new LifecycleListener interface & LifecycleEvent enum.

      LifecycleListener

      • will be documented as migration path for deprecated ServiceListeners
      • will provide single void handleEvent(ServiceController<?> controller, LifecycleEvent event) method
      • will hide MSC state machine internals to users
      • will fix performance issue of deprecated ServiceListeners

      LifecycleEvent will hold only four values: REMOVED, DOWN, FAILED & UP

            ropalka Richard Opalka
            ropalka Richard Opalka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: