if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(commitMessageRef1, getTxId(tx)) + " removed " + rows + " row(s)"); }
if (trace) { log.trace(JDBCUtil.statementToString(commitMessageRef1, getTxId(tx)) + " removed " + rows + " row(s)"); }
   public void commitTx(Transaction tx) throws Exception   {      if (log.isTraceEnabled()) { log.trace("updating database for committing transaction " + tx); }            Connection conn = null;      PreparedStatement ps = null;      TransactionWrapper wrap = new TransactionWrapper();      try      {         conn = ds.getConnection();         ps = conn.prepareStatement(commitMessageRef1);         if (tx.getGuidTxId() != null)         {            ps.setString(1, tx.getGuidTxId());         }         else         {            ps.setLong(1, tx.getLongTxId());         }                  int rows = ps.executeUpdate();         if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(commitMessageRef1, getTxId(tx)) + " removed " + rows + " row(s)"); }                           ps.close();         ps = conn.prepareStatement(commitMessageRef2);         if (tx.getGuidTxId() != null)         {            ps.setString(1, tx.getGuidTxId());         }         else         {            ps.setLong(1, tx.getLongTxId());         }                  rows = ps.executeUpdate();         if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(commitMessageRef2, null, getTxId(tx)) + " updated " + rows + " row(s)"); }         removeTXRecord(conn, tx);      }      catch (Exception e)      {         wrap.exceptionOccurred();         throw e;      }      finally      {                  if (ps != null)         {            try            {               ps.close();            }            catch (Throwable e)            {}         }         if (conn != null)         {            try            {               conn.close();            }            catch (Throwable e)            {}         }         wrap.end();      }   }