Skip to content

Replace Configurator et al #578

@adamretter

Description

@adamretter

The goal is to replace the Configurator (e.g. org.exist.config.*) with an approach that is less intrusive, leaks less abstractions and is more robust.

Current issues with Configurator:

  1. Intrusion into the object itself:
    1. The object must call the Configurator to instantiate itself.
    2. The object must annotate its members correctly.
  2. Calling Configurator.configure(this, config); from the Constructor of an object:
    1. Leaks the this from the constructor. See Java Concurrency in Practice: 3.2.1 Safe Construction Practices.
    2. May silently fail. i.e. the Object could not be configured, but these errors/exceptions are silently swallowed by the Configurator, resulting in an unconfigured object; Usually due to a coding bug elsewhere.
  3. org.exist.config.Configurator is unfinished:
    1. It contains many //XXX: comments which hide the TODOs.
    2. Error handling is not complete or safe/robust. e.g. the comment: //XXX: must be exception.
  4. Does not scale:
    1. The current approach keeps all configured objects in memory. If you have many groups and users this can rather use up a lot of RAM for objects which may never/rarely be accessed.

Metadata

Metadata

Assignees

Labels

enhancementnew features, suggestions, etc.in progressIssue is actively being worked upon

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions