cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAY-1972) A property to override DataSources of multi-module projects
Date Sat, 22 Nov 2014 16:01:33 GMT

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

Andrus Adamchik updated CAY-1972:
---------------------------------
    Description: 
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



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

[1] http://cayenne.apache.org/docs/3.1/cayenne-guide/configuration-properties.html




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

Mime
View raw message