db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <...@intermeta.de>
Subject Re: cvs commit: db-torque/src/java/org/apache/torque/util BasePeer.java
Date Sun, 20 Jul 2003 00:00:31 GMT
jmcnally@apache.org writes:

Same here. This is ridiculous. -1 on this.

	Regards
		Hennign


>jmcnally    2003/07/19 14:10:16

>  Modified:    src/java/org/apache/torque/util Tag: TORQUE_3_0_BRANCH
>                        BasePeer.java
>  Log:
>    replaced
>  
>    catch (TorqueException e)
>    {
>        Transaction.rollback(con);
>        throw e;
>    }
>  
>    with
>  
>    catch (TorqueException e)
>    {
>        if (con != null)  Transaction.rollback(con);
>        throw e;
>    }
>  
>    so that an exception which prevents getting a connection does not get
>    obscured by the attempt to use the connection in rollback.
>  
>  Revision  Changes    Path
>  No                   revision
>  
>  
>  No                   revision
>  
>  
>  1.55.2.3  +22 -7     db-torque/src/java/org/apache/torque/util/BasePeer.java
>  
>  Index: BasePeer.java
>  ===================================================================
>  RCS file: /home/cvs/db-torque/src/java/org/apache/torque/util/BasePeer.java,v
>  retrieving revision 1.55.2.2
>  retrieving revision 1.55.2.3
>  diff -u -r1.55.2.2 -r1.55.2.3
>  --- BasePeer.java	20 Jun 2003 08:40:02 -0000	1.55.2.2
>  +++ BasePeer.java	19 Jul 2003 21:10:15 -0000	1.55.2.3
>  @@ -425,8 +425,11 @@
>           }
>           catch (TorqueException e)
>           {
>  -            Transaction.rollback(con);
>  -            throw new TorqueException(e);
>  +            if (con != null) 
>  +            {
>  +                Transaction.rollback(con);
>  +            }
>  +            throw e;
>           }
>       }
>   
>  @@ -617,7 +620,10 @@
>           }
>           catch (TorqueException e)
>           {
>  -            Transaction.rollback(con);
>  +            if (con != null) 
>  +            {
>  +                Transaction.rollback(con);
>  +            }
>               throw e;
>           }
>   
>  @@ -1369,7 +1375,10 @@
>           }
>           catch (Exception e)
>           {
>  -            Transaction.rollback(con);
>  +            if (con != null) 
>  +            {
>  +                Transaction.rollback(con);
>  +            }
>               throw new TorqueException(e);
>           }
>   
>  @@ -1739,7 +1748,10 @@
>           }
>           catch (TorqueException e)
>           {
>  -            Transaction.rollback(con);
>  +            if (con != null) 
>  +            {
>  +                Transaction.rollback(con);
>  +            }
>               throw e;
>           }
>       }
>  @@ -1813,7 +1825,10 @@
>           }
>           catch (TorqueException e)
>           {
>  -            Transaction.rollback(db);
>  +            if (db != null) 
>  +            {
>  +                Transaction.rollback(db);
>  +            }
>               throw e;
>           }
>       }
>  
>  
>  

>---------------------------------------------------------------------
>To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
>For additional commands, e-mail: torque-dev-help@db.apache.org

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message