IDEMPIERE-3416 Implement the ability to track open DB connections

Implement Trx Display Name for forgotten class GridTabCSVImporter
This commit is contained in:
Carlos Ruiz 2019-12-18 22:07:56 +01:00
parent dbed99a875
commit 81b5ccbc9a
1 changed files with 2 additions and 7 deletions

View File

@ -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);
}