diff artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java @ 242:b35d32e507b6

Fix for flys/issue9 artifacts/trunk@1677 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 13 Apr 2011 11:26:53 +0000
parents 3e29395ebac6
children 6de74b0b878e
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java	Wed Apr 13 10:57:45 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java	Wed Apr 13 11:26:53 2011 +0000
@@ -499,19 +499,10 @@
                 }
 
                 int  id   = result.getInt(1);
-                long ttlX = result.getLong(3);
-
-                Long ttl = result.wasNull() ? null : Long.valueOf(ttlX);
+                long ttlX = result.getLong(2);
+                Long ttl  = result.wasNull() ? null : ttlX;
 
-                if (ttl != null) { // real time to life
-                    long last_access = result.getTimestamp(2).getTime();
-                    if (last_access + ttlX < System.currentTimeMillis()) {
-                        artifactOutdated(id);
-                        return false;
-                    }
-                }
-
-                String factoryName = result.getString(4);
+                String factoryName = result.getString(3);
 
                 if (factoryLookup == null) {
                     logger.error("factory lookup == null");
@@ -526,7 +517,7 @@
                     return false;
                 }
 
-                byte [] bytes = result.getBytes(5);
+                byte [] bytes = result.getBytes(4);
 
                 loaded[0] = loader.load(factory, ttl, bytes, id);
                 return true;

http://dive4elements.wald.intevation.org