Skip to content

Commit

Permalink
0000961: Uninstall feature needs to delete conflicts and transforms b…
Browse files Browse the repository at this point in the history
…efore trying to delete group links
  • Loading branch information
chenson42 committed Dec 18, 2012
1 parent 3eda5f7 commit 307e09a
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -89,6 +89,7 @@
import org.jumpmind.symmetric.service.impl.DataExtractorService;
import org.jumpmind.symmetric.service.impl.DataLoaderService;
import org.jumpmind.symmetric.service.impl.DataLoaderService.ConflictNodeGroupLink;
import org.jumpmind.symmetric.service.impl.TransformService.TransformTableNodeGroupLink;
import org.jumpmind.symmetric.service.impl.DataService;
import org.jumpmind.symmetric.service.impl.IncomingBatchService;
import org.jumpmind.symmetric.service.impl.LoadFilterService;
Expand Down Expand Up @@ -550,6 +551,12 @@ public synchronized void uninstall() {
for (ConflictNodeGroupLink conflict : conflicts) {
dataLoaderService.delete(conflict);
}

// need to remove all transforms before we can remove the node group links
List<TransformTableNodeGroupLink> transforms = transformService.getTransformTables();
for (TransformTableNodeGroupLink transformTable : transforms) {
transformService.deleteTransformTable(transformTable.getTransformId());
}

// remove the links so the symmetric table trigger will be removed
List<NodeGroupLink> links = configurationService.getNodeGroupLinks();
Expand All @@ -562,8 +569,7 @@ public synchronized void uninstall() {
triggerRouterService.syncTriggers();

} catch (SqlException ex) {
//TODO: figure out what we really want to do here...
log.error("SQL Exception while trying to uninstall. " + ex.getMessage() );
log.error("SQL Exception while trying to uninstall", ex);
}

// remove any additional triggers that may remain because they were not in trigger history
Expand Down

0 comments on commit 307e09a

Please sign in to comment.