Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Context variables are heavily used in Qpid Broker-J.
Over the years their implementation and use has grown organically.
Maybe it is time they are refactored.
Some reasons for considering a refactor:
- boilerplate: Currently a context variable requires quite a lot of boilerplate code. A variable for the name and the @ManagedContextDefault annotated default value, a @DerivedAttribute annotated getter for the materialized value, a variable to hold the materialized value, the code to materialize the context variable.
- inconsistency: Some context variables are materialized others aren't (i.e., change takes effect after restart vs immediately). The point of materialization is inconsistent (popular choices being onOpen and postResolve). Some expose the materialized value through a @DerivedAttribute others do not. The names of the context variables are sometimes directly on the scattered around @ManagedContextDefault sometimes on a separate variable.