Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2854

Rework ConfigurationPerformer

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0
    • Component/s: guice
    • Labels:
      None

      Description

      I have currently several issues with Configuration Performer class in Guice:

      • 1. ConfigurationPerformer should be bound to a single startable

      Loops are supported by injection framework through stubbing. However, this
      does not play well with the "initialization will follow injection path"
      strategy: some modules might try to init against "not yet initialized" components
      that was stubbed by the init strategy.

      The issue here is that multi-components configuration performers add additional complexity,
      and creates dependencies (init A & B at the same time) that lead to failures
      while modifying some injections.

      Saying "1 startable = 1 performer" prevents us from this, and fits our usage.

      • 2. ConfigurationPerformer::initModule should be able to throw Exception
      • Avoid unnecessary exception forwarding hurting exception readability
      • This is our "most common" use case, and leveraging it correctly saves lines of code
      • 3. ConfigurationPerformer name itself: Component initialization is not necessarily linked to configuration. This history inherited wording is confusing thus harmful...

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              btellier Benoit Tellier
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: