From 81b5ccbc9ac819fcd635d492e590e8e52180d318 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 18 Dec 2019 22:07:56 +0100 Subject: [PATCH] IDEMPIERE-3416 Implement the ability to track open DB connections Implement Trx Display Name for forgotten class GridTabCSVImporter --- .../src/org/adempiere/impexp/GridTabCSVImporter.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java b/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java index a45eed26f5..17c12b20fe 100644 --- a/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java +++ b/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java @@ -37,7 +37,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; -import java.util.UUID; import java.util.logging.Level; import org.adempiere.base.IGridTabImporter; @@ -242,6 +241,7 @@ public class GridTabCSVImporter implements IGridTabImporter manageMasterTrx(gridTab, null); createTrx(gridTab); } + trx.setDisplayName(GridTabCSVImporter.class.getName()+"_fileImport_" + gridTab.getTableName()); String recordResult = processRecord(importMode, gridTab, indxDetail, isDetail, idx, rowResult, childs); rowResult.append(recordResult); @@ -594,8 +594,7 @@ public class GridTabCSVImporter implements IGridTabImporter * @param gridTab */ private void createTrx(GridTab gridTab){ - - trxName = getTrxName(gridTab.getTableName()); + trxName = Trx.createTrxName("CSVImport"); gridTab.getTableModel().setImportingMode(true,trxName); trx = Trx.get(trxName,true); masterRecord = null; @@ -777,10 +776,6 @@ public class GridTabCSVImporter implements IGridTabImporter }//processRecord - private String getTrxName(String gritTabName){ - return "Import_" + gritTabName + "_" + UUID.randomUUID(); - } - private void throwAdempiereException(String msg){ throw new AdempiereException(msg); }