Skip to content

Commit

Permalink
only insert system dead triggers on registration node
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Dec 7, 2007
1 parent da45e10 commit cca6f8f
Showing 1 changed file with 18 additions and 21 deletions.
Expand Up @@ -124,31 +124,28 @@ public List<String> getRootConfigChannelTableNames() {
}

public void initTriggerRowsForConfigChannel() {
List<String> tableNames = null;
if (StringUtils.isEmpty(runtimeConfiguration.getRegistrationUrl())) {
tableNames = getRootConfigChannelTableNames();
} else {
tableNames = getNodeConfigChannelTableNames();
}
initSystemChannels();
String groupId = runtimeConfiguration.getNodeGroupId();
List<NodeGroupLink> targets = getGroupLinksFor(groupId);
if (targets != null && targets.size() > 0) {
for (NodeGroupLink target : targets) {
int initialLoadOrder = 1;
for (String tableName : tableNames) {
Trigger trigger = getTriggerForTarget(tableName, groupId, target.getTargetGroupId(),
Constants.CHANNEL_CONFIG);
if (trigger == null) {
jdbcTemplate.update(insertTriggerSql, new Object[] { tableName, groupId,
target.getTargetGroupId(), Constants.CHANNEL_CONFIG, initialLoadOrder++ });
List<String> tableNames = getRootConfigChannelTableNames();
initSystemChannels();
String groupId = runtimeConfiguration.getNodeGroupId();
List<NodeGroupLink> targets = getGroupLinksFor(groupId);
if (targets != null && targets.size() > 0) {
for (NodeGroupLink target : targets) {
int initialLoadOrder = 1;
for (String tableName : tableNames) {
Trigger trigger = getTriggerForTarget(tableName, groupId, target.getTargetGroupId(),
Constants.CHANNEL_CONFIG);
if (trigger == null) {
jdbcTemplate.update(insertTriggerSql, new Object[] { tableName, groupId,
target.getTargetGroupId(), Constants.CHANNEL_CONFIG, initialLoadOrder++ });
}
}
}
} else {
logger.error("Could not find any targets for your group id of "
+ runtimeConfiguration.getNodeGroupId()
+ ". Please validate your node group id against the setup in the database.");
}
} else {
logger.error("Could not find any targets for your group id of "
+ runtimeConfiguration.getNodeGroupId()
+ ". Please validate your node group id against the setup in the database.");
}
}

Expand Down

0 comments on commit cca6f8f

Please sign in to comment.