From b12bc0a5fa9439a662bdadb7d2dc3ae26a382d94 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 15 Nov 2002 22:13:21 +0000 Subject: [PATCH] fix serious bug introduced with the media InputStream changes that caused a database connection to be lost when a LargeObject was missing/broken. eventually postgrss would hit it's max connections limit --- source/mircoders/entity/EntityImages.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/mircoders/entity/EntityImages.java b/source/mircoders/entity/EntityImages.java index ced3e750..2617cc10 100755 --- a/source/mircoders/entity/EntityImages.java +++ b/source/mircoders/entity/EntityImages.java @@ -54,7 +54,7 @@ import mir.storage.*; * Diese Klasse enthält die Daten eines MetaObjekts * * @author RK, mh - * @version $Id: EntityImages.java,v 1.8 2002/11/04 04:35:21 mh Exp $ + * @version $Id: EntityImages.java,v 1.9 2002/11/15 22:13:21 mh Exp $ */ @@ -105,7 +105,6 @@ public class EntityImages extends EntityUploadedMedia } catch (Exception e) { e.printStackTrace(); theLog.printError("EntityImages -- getImage failed"+e.toString()); - throwStorageObjectException(e, "EntityImages -- getImage failed: "); try { con.setAutoCommit(true); } catch (Exception e2) { @@ -115,8 +114,9 @@ public class EntityImages extends EntityUploadedMedia +e2.toString()); } theStorageObject.freeConnection(con,stmt); + throwStorageObjectException(e, "EntityImages -- getImage failed: "); } - //} + return img_in; } @@ -235,7 +235,6 @@ public class EntityImages extends EntityUploadedMedia } catch (Exception e) { e.printStackTrace(); theLog.printError("EntityImages -- getIcon failed"+e.toString()); - throwStorageObjectException(e, "EntityImages -- getIcon failed:"); try { con.setAutoCommit(true); } catch (Exception e2) { @@ -245,6 +244,7 @@ public class EntityImages extends EntityUploadedMedia +e2.toString()); } theStorageObject.freeConnection(con,stmt); + throwStorageObjectException(e, "EntityImages -- getIcon failed:"); } return img_in; -- 2.11.0