You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2014/11/22 17:04:34 UTC

[jira] [Closed] (CAY-1972) A property to override DataSources of multi-module projects

     [ https://issues.apache.org/jira/browse/CAY-1972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-1972.
--------------------------------
    Resolution: Fixed

> A property to override DataSources of multi-module projects 
> ------------------------------------------------------------
>
>                 Key: CAY-1972
>                 URL: https://issues.apache.org/jira/browse/CAY-1972
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Minor
>
> Here is a situation:
> Collection<String> configs = // configs in random, changing order
> ServerRuntime runtime = new ServerRuntimeBuilder().addConfigs(configs).build();
> The resulting runtime has multiple DataNodes. Now in development I need to provide connection data for each of the DataNodes using properties per [1]. Due to the random order of configs collection, domain name in the resulting stack also changes between the invocations. So I can't use 'cayenne.jdbc.driver.domain_name.node_name' property reliably. 
> We need an easy way to fix the domain name in a multi-project config. Internally this will be achieved via a new DI property - "cayenne.server.domain.name". 
> Public API will use an existing ServerRuntimeBuilder(String) constructor, but redefining its argument as a name of the domain, not a config.
> UPGRADE NOTES:
> * Users of multi-config projects may be used to ServerRuntime behavior that the name of the result domain is equal to the name of the last project config. We are trying to move away from this behavior, so ServerRuntimeBuilder will only use config name as the name of the project if there's one config and no override. Otherwise it will use the override, or if not set - "cayenne" as the default name.
> [1] http://cayenne.apache.org/docs/3.1/cayenne-guide/configuration-properties.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)