Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -181,12 +181,6 @@ public class MultiDBTransactionManager implements AutoCloseable {
|
|||||||
return connection.prepareStatement(sql);
|
return connection.prepareStatement(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PreparedStatement prepareStatementOnDistributore(String sql) throws Exception {
|
|
||||||
try (Connection connection = getDistributoreConnection()) {
|
|
||||||
return connection.prepareStatement(sql);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Connection> getActiveConnections() throws SQLException {
|
public List<Connection> getActiveConnections() throws SQLException {
|
||||||
return allConnections;
|
return allConnections;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ public class SyncManager {
|
|||||||
|
|
||||||
proceedSyncronization(entitySource, entityCloned, lastProfileUsed, multiDBTransactionManager);
|
proceedSyncronization(entitySource, entityCloned, lastProfileUsed, multiDBTransactionManager);
|
||||||
|
|
||||||
|
distributoreConnection.commit();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
String subscriptor = null;
|
String subscriptor = null;
|
||||||
@@ -104,6 +105,9 @@ public class SyncManager {
|
|||||||
|
|
||||||
e = new SyncException(e, profileDb);
|
e = new SyncException(e, profileDb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
distributoreConnection.rollback();
|
||||||
|
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user