Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
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.