cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johnth...@apache.org
Subject [4/4] cayenne git commit: Enhance CayenneFilter to allow specifying multiple comma-separated DataDomain locations in web.xml
Date Wed, 02 May 2018 15:19:51 GMT
Enhance CayenneFilter to allow specifying multiple comma-separated DataDomain locations in
web.xml


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/cac0527e
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/cac0527e
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/cac0527e

Branch: refs/heads/master
Commit: cac0527eaa813bbb15a56aff9d91ee75774ee034
Parents: 20d20c7
Author: John Huss <johnthuss@apache.org>
Authored: Wed May 2 10:05:40 2018 -0500
Committer: John Huss <johnthuss@gmail.com>
Committed: Wed May 2 10:16:04 2018 -0500

----------------------------------------------------------------------
 .../org/apache/cayenne/configuration/web/CayenneFilter.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/cac0527e/cayenne-web/src/main/java/org/apache/cayenne/configuration/web/CayenneFilter.java
----------------------------------------------------------------------
diff --git a/cayenne-web/src/main/java/org/apache/cayenne/configuration/web/CayenneFilter.java
b/cayenne-web/src/main/java/org/apache/cayenne/configuration/web/CayenneFilter.java
index c4c3ab9..2f158c5 100644
--- a/cayenne-web/src/main/java/org/apache/cayenne/configuration/web/CayenneFilter.java
+++ b/cayenne-web/src/main/java/org/apache/cayenne/configuration/web/CayenneFilter.java
@@ -69,11 +69,15 @@ public class CayenneFilter implements Filter {
         WebConfiguration configAdapter = new WebConfiguration(config);
 
         String configurationLocation = configAdapter.getConfigurationLocation();
+        String[] configurationLocations = null;
+        if (configurationLocation != null) {
+        	configurationLocations = configurationLocation.split(",\\s*");
+        }
         Collection<Module> modules = configAdapter.createModules();
         modules.addAll(getAdditionalModules());
 
         ServerRuntime runtime = ServerRuntime.builder()
-                .addConfig(configurationLocation)
+                .addConfigs(configurationLocations)
                 .addModules(modules).build();
 
         WebUtil.setCayenneRuntime(config.getServletContext(), runtime);


Mime
View raw message