Subject: We'd like to remove "isis.deploymentType" ... any objections?


Thanks everybody participating in this discussion!

I would like to bring this topic to a conclusion, especially because I'm again investing hours of troubleshooting, because there are currently bugs and inconsistencies with the v2 branch, when the framework evaluates itself as being in prototyping mode or not.

Summarizing my motivation:

1) PROTOTYPING true/false needs to be available to the framework before domain-services are bootstrapped, hence the decision cannot be made with such a service, that would be too late.

2) PROTOTYPING true/false should be immutable within the life-cycle of an application, which technically can be perfectly done with system env. vars.

Here's what I'm gonna do:

I'll introduce an Interface 'DeploymentTypeProvider' that handles the PROTOTYPING true/false decision. This is not a DomainService but a SPI! Any implementation of this should not rely on the IsisConfiguration or any DomainService, since these are only available later in the bootstrapping phases. The framework will provide a default implementation utilizing the concept I described earlier in this discussion (system env. var only).

I'll leave it up to you to provide your own implementations of  'DeploymentTypeProvider', which will be plugable via the ServiceLoader [1] mechanism as was introduced with Java 7.

Hope that serves all use-cases and btw. nothing is set in stone, we can always change this later, if there are good reasons to do so.

Cheers, Andi!

[1] https://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html

On 2018/11/01 20:31:51, Brian K <[EMAIL PROTECTED]> wrote: