BF [ 2849122 ] PO.AfterSave is not rollback on error

https://sourceforge.net/tracker/?func=detail&aid=2849122&group_id=176962&atid=879332

Using a trx that was previously closed or never opened
Creating and starting the transaction right here, but please note
that this is not a good practice
This commit is contained in:
teo_sarca 2009-09-08 09:47:23 +00:00
parent dceebebb1d
commit 41235d67e2
1 changed files with 8 additions and 0 deletions

View File

@ -1954,6 +1954,14 @@ public abstract class PO
else
{
trx = Trx.get(m_trxName, false);
if (trx == null)
{
// Using a trx that was previously closed or never opened
// Creating and starting the transaction right here, but please note
// that this is not a good practice
trx = Trx.get(m_trxName, true);
log.warning("Transaction closed or never opened ("+m_trxName+") => starting now");
}
}
// Before Save