changeset 829:95733e564896

Bugfix: Put some Code that is responsible for Synchonization into the final-block to prevent that the lock is not released. gnv-artifacts/trunk@923 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 13 Apr 2010 14:26:21 +0000
parents 28028979c813
children 3ab5754e72e3
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java
diffstat 2 files changed, 33 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Tue Apr 13 14:22:52 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Tue Apr 13 14:26:21 2010 +0000
@@ -1,3 +1,15 @@
+2010-04-13  Tim Englich  <tim.englich@intevation.de>
+
+	* src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java (getWMS): 
+	  Bugfix: Put some Code that is responsible for Synchonization into the 
+	  final-block to prevent that the lock is not released.
+
+2010-04-13  Tim Englich  <tim.englich@intevation.de>
+
+	* doc/conf/products/layer/conf.xml, 
+	  src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java : 
+	  Integrated the possibility to change the Title of an Layer in Product Layer.
+
 2010-04-13  Tim Englich  <tim.englich@intevation.de>
 
 	* src/main/java/de/intevation/gnv/artifacts/services/MetaDataService.java: 
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java	Tue Apr 13 14:22:52 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java	Tue Apr 13 14:26:21 2010 +0000
@@ -1,5 +1,21 @@
 package de.intevation.gnv.state.profile.horizontalcrosssection;
 
+import java.awt.Dimension;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
 import com.vividsolutions.jts.geom.Coordinate;
 import com.vividsolutions.jts.geom.Envelope;
 import com.vividsolutions.jts.geom.MultiLineString;
@@ -8,29 +24,20 @@
 
 import de.intevation.artifactdatabase.Config;
 import de.intevation.artifactdatabase.XMLUtils;
-
 import de.intevation.artifacts.ArtifactNamespaceContext;
 import de.intevation.artifacts.CallContext;
-
 import de.intevation.gnv.artifacts.cache.CacheFactory;
-
 import de.intevation.gnv.artifacts.context.GNVArtifactContext;
-
 import de.intevation.gnv.geobackend.base.Result;
 import de.intevation.gnv.geobackend.base.ResultDescriptor;
-
 import de.intevation.gnv.geobackend.base.query.QueryExecutor;
 import de.intevation.gnv.geobackend.base.query.QueryExecutorFactory;
-
 import de.intevation.gnv.geobackend.base.query.exception.QueryException;
-
 import de.intevation.gnv.geobackend.sde.datasources.RasterObject;
-
 import de.intevation.gnv.math.AreaInterpolation;
 import de.intevation.gnv.math.AttributedPoint2ds;
 import de.intevation.gnv.math.Point2d;
 import de.intevation.gnv.math.QueriedXYDepth;
-
 import de.intevation.gnv.raster.ExternalIndexConverter;
 import de.intevation.gnv.raster.IsoAttributeGenerator;
 import de.intevation.gnv.raster.JTSMultiLineStringProducer;
@@ -39,12 +46,9 @@
 import de.intevation.gnv.raster.PaletteManager;
 import de.intevation.gnv.raster.Raster;
 import de.intevation.gnv.raster.Vectorizer;
-
 import de.intevation.gnv.state.InputData;
 import de.intevation.gnv.state.OutputStateBase;
-
 import de.intevation.gnv.state.exception.StateException;
-
 import de.intevation.gnv.utils.ExclusiveExec;
 import de.intevation.gnv.utils.FileUtils;
 import de.intevation.gnv.utils.MapfileGenerator;
@@ -54,25 +58,6 @@
 import de.intevation.gnv.utils.StringUtils;
 import de.intevation.gnv.utils.WKTUtils;
 
-import java.awt.Dimension;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
 /**
  * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
  * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
@@ -349,13 +334,12 @@
         else {
             AttributedPoint2ds result = getResult(uuid, callContext);
             ExclusiveExec.UniqueKey key = ExclusiveExec.INSTANCE.acquire(uuid);
+            try{
             if (result != null
             && (path = writeToShapeFile(uuid, result, callContext)) != null) {
-                ExclusiveExec.INSTANCE.release(key);
 
                 String paramType = findParameterType(callContext);
-
-                InputData inputTitle = this.inputData.get("title");
+                
                 String    title      = getLayerTitle(inputData);
                 if (title == null) {
                     title = uuid;
@@ -378,6 +362,9 @@
 
                 pathElement.setTextContent(path);
             }
+            }finally{
+                ExclusiveExec.INSTANCE.release(key);
+            }
         }
 
         return document;

http://dive4elements.wald.intevation.org