diff --git a/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/ImportStep2GetTableNameService.java b/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/ImportStep2GetTableNameService.java index 8409fd25f..0a84ef8e9 100644 --- a/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/ImportStep2GetTableNameService.java +++ b/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/ImportStep2GetTableNameService.java @@ -81,12 +81,11 @@ public void execute(SendResponse resp) throws ArcException { if (!reprise) { this.clientDao.updatePilotage(table.getTableName()); } - - this.clientDao.dropTable(table.getTableName()); + this.clientDao.dropTable(table); } table = this.clientDao.getAClientTableByType(ExportTrackingType.TRACK); - this.clientDao.dropTable(table.getTableName()); + this.clientDao.dropTable(table); resp.send(" "); resp.endSending(); diff --git a/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/dao/ClientDao.java b/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/dao/ClientDao.java index 041016664..0e4305945 100644 --- a/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/dao/ClientDao.java +++ b/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/dao/ClientDao.java @@ -435,20 +435,18 @@ public TableToRetrieve getAClientTableByName(String tableName) throws ArcExcepti : new TableToRetrieve(content.get("nod").get(0), content.get("table_to_retrieve").get(0)); } - public void dropTable(String clientTable) { - dropTable(ArcDatabase.COORDINATOR.getIndex(), clientTable); - } - public void dropTable(int connectionIndex, String clientTable) { + private void dropTable(int connectionIndex, String clientTable) { UtilitaireDao.get(connectionIndex).dropTable(connection, clientTable); } public void dropTable(TableToRetrieve table) { + + dropTable(ArcDatabase.COORDINATOR.getIndex(), table.getTableName()); - dropTable(table.getTableName()); + int numberOfExecutorNods = ArcDatabase.numberOfExecutorNods(); if (table.getNod().equals(ArcDatabase.EXECUTOR)) { - int numberOfExecutorNods = ArcDatabase.numberOfExecutorNods(); for (int executorConnectionId = ArcDatabase.EXECUTOR.getIndex(); executorConnectionId < ArcDatabase.EXECUTOR .getIndex() + numberOfExecutorNods; executorConnectionId++) { dropTable(executorConnectionId, table.getTableName());