Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2852

Add plugin/bean scopes to unify object lifecycle management APIs

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • Core
    • None

    Description

      In the 2.x plugin API, we implement a sort of ad hoc mechanism for lifecycle and instance management based on a plugin's category. For example, the "Core" category of plugins all map to lifecycles of a configuration file with each instance injected into a particular configuration node or nodes. Other plugins are created in other scopes, and some other code attempts to emulate singleton scopes via system properties and other similar indirections.

      In 3.0, these APIs should be unified into a singular "scope" concept. This idea is modeled after the Context API from CDI. A scope should control the lifecycle of a plugin instance which can be specified through an annotation. Example scopes that need to be supported include singleton, logger context, configuration, and dependent. The singleton and dependent scopes should behave analogously to their CDI contexts. The logger context and configuration scopes should be bound to the lifecycles of LoggerContext and Configuration respectively.

      Attachments

        Activity

          People

            mattsicker Matt Sicker
            mattsicker Matt Sicker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: