Scott Eade wrote:
See the answer to question 10 in the Torque FAQ: http://wiki.apache.org/db-torque/FrequentlyAskedQuestions#head-f21b65aabdf5f90c9f5df248411b7de3aab118b7
i'm not sure if Thomas Fischer if right writing: "Note that Transaction.safeRollback() does not release the database connection, so replacing Transaction.rollback() by transaction.safeRollback() in the above code would lead to the leakage of database connections if the transaction fails." here is the safeRollback method
public static void safeRollback(Connection con)
{
if (con == null)
{
log.debug("called safeRollback with null argument");
}
else
{
try
{
Transaction.rollback(con);
}
catch (TorqueException e)
{
log.warn("An error occured during rollback.", e);
}
}
}
as you can see it is doing the same as Thomas Fischer wrote in example. So IMHO users can freely use safeRollback if they do not need rollback exception handling.
Regards, Kostya
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
