changeset 1022:930a9ce24294

Datacage: Fixed caching issue leading to incorrect results. flys-artifacts/trunk@2480 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 10 Aug 2011 08:43:38 +0000
parents 3d36e6000915
children 5cb84ceee2a0
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Recommendations.java
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Aug 09 10:25:45 2011 +0000
+++ b/flys-artifacts/ChangeLog	Wed Aug 10 08:43:38 2011 +0000
@@ -1,3 +1,8 @@
+2011-08-10  Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/datacage/Recommendations.java:
+	  User connection was cached, system was not. Lead to incorrect results.
+
 2011-08-09  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* doc/conf/meta-data-user.xml: Added <old_calculations> element
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Recommendations.java	Tue Aug 09 10:25:45 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Recommendations.java	Wed Aug 10 08:43:38 2011 +0000
@@ -149,10 +149,10 @@
                     Connection userConnection = dataSource.getConnection();
                     try {
                         connections.add(new Builder.NamedConnection(
-                            Builder.CONNECTION_USER, userConnection));
+                            Builder.CONNECTION_USER, userConnection, false));
 
                         connections.add(new Builder.NamedConnection(
-                            Builder.CONNECTION_SYSTEM, systemConnection, false));
+                            Builder.CONNECTION_SYSTEM, systemConnection, true));
 
                         userBuilder.build(connections, result, parameters);
                     }
@@ -162,7 +162,7 @@
                 }
                 else { // system template only
                     connections.add(new Builder.NamedConnection(
-                        Builder.CONNECTION_SYSTEM, systemConnection));
+                        Builder.CONNECTION_SYSTEM, systemConnection, true));
 
                     systemBuilder.build(connections, result, parameters);
                 }

http://dive4elements.wald.intevation.org