From ac241a5db2c4dcc5f641f6199862c29098856023 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 12 Jun 2013 00:10:02 -0500 Subject: [PATCH] IDEMPIERE-1044 Load testing / avoid trxname > 60 chars (i.e. saving C_BPartner_Location) --- org.adempiere.base/src/org/compiere/model/PO.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/PO.java b/org.adempiere.base/src/org/compiere/model/PO.java index d6c777eeb6..5366df5418 100644 --- a/org.adempiere.base/src/org/compiere/model/PO.java +++ b/org.adempiere.base/src/org/compiere/model/PO.java @@ -2003,7 +2003,11 @@ public abstract class PO Savepoint savepoint = null; if (m_trxName == null) { - m_trxName = Trx.createTrxName(LOCAL_TRX_PREFIX + get_TableName()); + StringBuilder l_trxname = new StringBuilder(LOCAL_TRX_PREFIX) + .append(get_TableName()); + if (l_trxname.length() > 23) + l_trxname.setLength(23); + m_trxName = Trx.createTrxName(l_trxname.toString()); localTrx = Trx.get(m_trxName, true); } else