IDEMPIERE-427 Improve logging adding tablename to the local POSave trx

This commit is contained in:
Carlos Ruiz 2012-09-11 16:51:06 -05:00
parent a5dc636526
commit 7c7a3d9464
2 changed files with 5 additions and 2 deletions

View File

@ -99,6 +99,8 @@ import org.w3c.dom.Element;
public abstract class PO
implements Serializable, Comparator<Object>, Evaluatee, Cloneable
{
public static final String LOCAL_TRX_PREFIX = "POSave";
/**
*
*/
@ -1981,7 +1983,7 @@ public abstract class PO
Savepoint savepoint = null;
if (m_trxName == null)
{
m_trxName = Trx.createTrxName("POSave");
m_trxName = Trx.createTrxName(LOCAL_TRX_PREFIX + get_TableName());
localTrx = Trx.get(m_trxName, true);
}
else

View File

@ -28,6 +28,7 @@ import java.util.UUID;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.PO;
/**
* Transaction Management.
@ -640,7 +641,7 @@ public class Trx implements VetoableChangeListener
private boolean isLocalTrx(String trxName)
{
return trxName == null
|| trxName.startsWith("POSave") // TODO: hardcoded
|| trxName.startsWith(PO.LOCAL_TRX_PREFIX) // TODO: hardcoded
;
}