IDEMPIERE-3416 Implement the ability to track open DB connections
Implement Trx Display Name for forgotten class GridTabCSVImporter
This commit is contained in:
parent
dbed99a875
commit
81b5ccbc9a
|
@ -37,7 +37,6 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.adempiere.base.IGridTabImporter;
|
import org.adempiere.base.IGridTabImporter;
|
||||||
|
@ -242,6 +241,7 @@ public class GridTabCSVImporter implements IGridTabImporter
|
||||||
manageMasterTrx(gridTab, null);
|
manageMasterTrx(gridTab, null);
|
||||||
createTrx(gridTab);
|
createTrx(gridTab);
|
||||||
}
|
}
|
||||||
|
trx.setDisplayName(GridTabCSVImporter.class.getName()+"_fileImport_" + gridTab.getTableName());
|
||||||
|
|
||||||
String recordResult = processRecord(importMode, gridTab, indxDetail, isDetail, idx, rowResult, childs);
|
String recordResult = processRecord(importMode, gridTab, indxDetail, isDetail, idx, rowResult, childs);
|
||||||
rowResult.append(recordResult);
|
rowResult.append(recordResult);
|
||||||
|
@ -594,8 +594,7 @@ public class GridTabCSVImporter implements IGridTabImporter
|
||||||
* @param gridTab
|
* @param gridTab
|
||||||
*/
|
*/
|
||||||
private void createTrx(GridTab gridTab){
|
private void createTrx(GridTab gridTab){
|
||||||
|
trxName = Trx.createTrxName("CSVImport");
|
||||||
trxName = getTrxName(gridTab.getTableName());
|
|
||||||
gridTab.getTableModel().setImportingMode(true,trxName);
|
gridTab.getTableModel().setImportingMode(true,trxName);
|
||||||
trx = Trx.get(trxName,true);
|
trx = Trx.get(trxName,true);
|
||||||
masterRecord = null;
|
masterRecord = null;
|
||||||
|
@ -777,10 +776,6 @@ public class GridTabCSVImporter implements IGridTabImporter
|
||||||
|
|
||||||
}//processRecord
|
}//processRecord
|
||||||
|
|
||||||
private String getTrxName(String gritTabName){
|
|
||||||
return "Import_" + gritTabName + "_" + UUID.randomUUID();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void throwAdempiereException(String msg){
|
private void throwAdempiereException(String msg){
|
||||||
throw new AdempiereException(msg);
|
throw new AdempiereException(msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue