changeset 1128:81f0a5e66d71

Add module for FLYS artifacts geo-backend/trunk@1283 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 01 Feb 2011 17:37:09 +0000
parents ebeb56428409
children ccfa07b88476
files geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/CachingQueryExecutorFactory.java geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/DefaultQueryExceutor.java
diffstat 2 files changed, 12 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/CachingQueryExecutorFactory.java	Tue Nov 02 17:52:22 2010 +0000
+++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/CachingQueryExecutorFactory.java	Tue Feb 01 17:37:09 2011 +0000
@@ -43,7 +43,6 @@
 
     public CachingQueryExecutorFactory() {
         log.info("using SQL cache");
-
         init();
     }
 
@@ -55,17 +54,17 @@
                 "Wasn't able to initialize cache.");
             return;
         }
-        else {
-            String configFile = config.getCacheConfiguration();
-            manager = configFile != null
-                ? new CacheManager(configFile)
-                : new CacheManager();
-            manager.addCache(CACHE_NAME);
-            MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
-            ManagementService.registerMBeans(manager, mBeanServer, false, false, false, true);
-            CacheCleaner cc = new CacheCleaner();
-            cc.start();
-        }
+        String configFile = config.getCacheConfiguration();
+        manager = configFile != null
+            ? new CacheManager(configFile)
+            : new CacheManager();
+        manager.addCache(CACHE_NAME);
+        MBeanServer mBeanServer =
+            ManagementFactory.getPlatformMBeanServer();
+        ManagementService.registerMBeans(
+            manager, mBeanServer, false, false, false, true);
+        CacheCleaner cc = new CacheCleaner();
+        cc.start();
     }
 
     public QueryExecutor getQueryExecutor() {
--- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/DefaultQueryExceutor.java	Tue Nov 02 17:52:22 2010 +0000
+++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/DefaultQueryExceutor.java	Tue Feb 01 17:37:09 2011 +0000
@@ -98,7 +98,7 @@
                         log.info("-> Database query took " +
                             (end.getTime() - start.getTime()) + " ms.");
 
-                        cacheable = rs instanceof Uncacheable ? false : true;
+                        cacheable = !(rs instanceof Uncacheable);
 
                         returnValue = super.createResultCollection(rs);
                     }else{

http://dive4elements.wald.intevation.org