Return-Path: Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 28851 invoked from network); 16 Jun 2003 16:45:17 -0000 Received: from unknown (HELO fastestdog.com) (12.163.25.7) by daedalus.apache.org with SMTP; 16 Jun 2003 16:45:17 -0000 Received: from rogue ([192.168.1.7]) by fastestdog.com ( IA Mail Server Version: 4.2.3. Build: 2017 ) ; Mon, 16 Jun 2003 12:44:26 -0400 From: "Aury G. Friedman" To: Subject: Exception in BaseXxxx.save() leaves alreadyInSave=true Date: Mon, 16 Jun 2003 12:44:19 -0400 Message-ID: <00c201c33426$88716400$0701a8c0@rogue> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00C3_01C33405.015FC400" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_00C3_01C33405.015FC400 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello. When I call xxxx.save() and there is a SQL exception in its BaseXxxx.save(), Torque does not set the alreadyInSave flag to false. It rolls back the transaction and rethrows an exception, which is cool. But since the flag is not reset, it will never again attempt to save the = record. =20 Because the flag is private, the calling class itself can not alter the flag. So I am left with altering the method in the base class to look = like: =20 public void save(String dbName) throws TorqueException { Connection con =3D null; try { con =3D Transaction.begin(dbName); save(con); Transaction.commit(con); } catch(TorqueException e) { Transaction.safeRollback(con); alreadyInSave=3Dfalse; // added to prevent Torque from never attempting to save the record throw e; } } Am I missing something or is this a bug in Torque? =20 Thanks, Aury G. Friedman =20 =20 =20 ------=_NextPart_000_00C3_01C33405.015FC400--