# HG changeset patch # User Ingo Weinzierl # Date 1309160732 0 # Node ID e95e6df97e554368e6f46c9c6d5d7240eecbf53a # Parent c09c9e05ecfa88ce2f381282967796af3f46c3c3 #177 Commented out the code that generates the series names in discharge curves. This code currently generates memory problems and stops the server accepting new http requests. flys-artifacts/trunk@2245 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r c09c9e05ecfa -r e95e6df97e55 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Sun Jun 26 17:18:59 2011 +0000 +++ b/flys-artifacts/ChangeLog Mon Jun 27 07:45:32 2011 +0000 @@ -1,3 +1,12 @@ +2011-06-27 Ingo Weinzierl + + flys/issue177 (WINFO: Abflusskurven am Pegel verursachen ein Hängen des Servers) + + * src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java: + Commented out code to generate time ranges for series names. There + seems to be a problem while loading the discharge tables of a gauge or + while determining the start and/or end time of such discharge tables. + 2011-06-26 Sascha L. Teichmann * src/main/java/de/intevation/flys/**/*.java: Removed trailing whitespace. diff -r c09c9e05ecfa -r e95e6df97e55 flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java --- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java Sun Jun 26 17:18:59 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java Mon Jun 27 07:45:32 2011 +0000 @@ -150,33 +150,37 @@ protected String getSeriesName(Gauge gauge) { - List dts = gauge.getDischargeTables(); - - for (DischargeTable dt: dts) { - if (dt.getKind() == 0) { - TimeInterval ti = dt.getTimeInterval(); - - Date start = ti.getStartTime(); - Date end = ti.getStopTime(); - - String name = gauge.getName(); + // XXX The following code stops the artifact server accepting new HTTP + // requests. It needs more analysis! Is loading the discharge table a + // memory problem? Or is the time interval the problem? - if (end == null) { - Object[] args = new Object[] { name, start }; - return msg( - "chart.discharge.curve.curve.valid.from", - "", - args); - } - else { - Object[] args = new Object[] { name, start, end }; - return msg( - "chart.discharge.curve.curve.valid.range", - "", - args); - } - } - } + //List dts = gauge.getDischargeTables(); + + //for (DischargeTable dt: dts) { + // if (dt.getKind() == 0) { + // TimeInterval ti = dt.getTimeInterval(); + + // Date start = ti.getStartTime(); + // Date end = ti.getStopTime(); + + // String name = gauge.getName(); + + // if (end == null) { + // Object[] args = new Object[] { name, start }; + // return msg( + // "chart.discharge.curve.curve.valid.from", + // "", + // args); + // } + // else { + // Object[] args = new Object[] { name, start, end }; + // return msg( + // "chart.discharge.curve.curve.valid.range", + // "", + // args); + // } + // } + //} return gauge.getName(); }