From torque-dev-return-11810-apmail-db-torque-dev-archive=db.apache.org@db.apache.org Mon Sep 24 07:08:21 2012 Return-Path: X-Original-To: apmail-db-torque-dev-archive@www.apache.org Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D8D69D4B8 for ; Mon, 24 Sep 2012 07:08:20 +0000 (UTC) Received: (qmail 67776 invoked by uid 500); 24 Sep 2012 07:08:20 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 67478 invoked by uid 500); 24 Sep 2012 07:08:20 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 64787 invoked by uid 99); 24 Sep 2012 07:08:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2012 07:08:12 +0000 Date: Mon, 24 Sep 2012 18:08:12 +1100 (NCT) From: "Thomas Fox (JIRA)" To: torque-dev@db.apache.org Message-ID: <489840797.115462.1348470492989.JavaMail.jiratomcat@arcas> Subject: [jira] [Closed] (TORQUE-119) Method "save" doesn't handle exceptions which results in unsavable objects MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TORQUE-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Fox closed TORQUE-119. ----------------------------- > Method "save" doesn't handle exceptions which results in unsavable objects > -------------------------------------------------------------------------- > > Key: TORQUE-119 > URL: https://issues.apache.org/jira/browse/TORQUE-119 > Project: Torque > Issue Type: Bug > Components: Generator > Affects Versions: 3.3 > Reporter: Florian Liese > Assignee: Thomas Fox > Fix For: 4.0-beta1 > > > In the method "public void save(Connection con) throws TorqueException" (generated by templates>om>Object) the field "alreadyInSave" indicates that there is an ongoing save process. In the beginning it is set to "true", at the end it is set back to "false". But if an exception occurs (while calling doInsert(...) or doUpdate(...)) this field will not be set back to false 'cause the method throws this exception immediately. So afterwards it isn't possible to save an object using this method. > proposal for fix: > Wrap the "internal" of the save method with a "try { ... } finally { ... }" - statement and in the finally set the field "alreadyInSave" to false. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org