diff --git a/org.adempiere.base/src/org/compiere/model/PO.java b/org.adempiere.base/src/org/compiere/model/PO.java index 26932d469c..4b01542060 100644 --- a/org.adempiere.base/src/org/compiere/model/PO.java +++ b/org.adempiere.base/src/org/compiere/model/PO.java @@ -99,6 +99,8 @@ import org.w3c.dom.Element; public abstract class PO implements Serializable, Comparator, 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 diff --git a/org.adempiere.base/src/org/compiere/util/Trx.java b/org.adempiere.base/src/org/compiere/util/Trx.java index 6b61fdd5ad..7799346ed9 100644 --- a/org.adempiere.base/src/org/compiere/util/Trx.java +++ b/org.adempiere.base/src/org/compiere/util/Trx.java @@ -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 ; }