You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Tellier Benoit (JIRA)" <se...@james.apache.org> on 2019/08/12 06:50:00 UTC

[jira] [Created] (JAMES-2854) Rework ConfigurationPerformer

Tellier Benoit created JAMES-2854:
-------------------------------------

             Summary: Rework ConfigurationPerformer
                 Key: JAMES-2854
                 URL: https://issues.apache.org/jira/browse/JAMES-2854
             Project: James Server
          Issue Type: Improvement
          Components: guice
            Reporter: Tellier Benoit


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...




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org