Skip to content

Commit

Permalink
Fixed 1.4.0 bug. Last ack's ok status in a batch had a line feed and …
Browse files Browse the repository at this point in the history
…was getting recorded as an error. Also fixed a log message and the injection of some missing services (keith's stuff)
  • Loading branch information
chenson42 committed May 14, 2008
1 parent fa664f3 commit 40ad506
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Expand Up @@ -245,8 +245,10 @@ public void register() {
}
}
}
} else if (runtimeConfiguration.getExternalId().equals(node.getExternalId()) && runtimeConfiguration.getNodeGroupId().equals(node.getNodeGroupId())) {
} else if (node != null && runtimeConfiguration.getExternalId().equals(node.getExternalId()) && runtimeConfiguration.getNodeGroupId().equals(node.getNodeGroupId())) {
heartbeat();
} else if (node == null) {
logger.info("Could not find my identity in the database and this node is configured as a registration server. We are auto inserting the required rows to begin operation.");
} else {
throw new IllegalStateException("The configured state does not match recorded database state. The recorded external id is " + node.getExternalId() + " while the configured external id is " + runtimeConfiguration.getExternalId() + ". The recorded node group id is " + node.getNodeGroupId() + " while the configured node group id is " + runtimeConfiguration.getNodeGroupId());
}
Expand Down
Expand Up @@ -54,7 +54,7 @@ public void pullData() {
if (dataLoaderService.loadData(node, nodeService.findIdentity())) {
logger.info("Pull data received" + nodeName);
} else {
logger.info("Pull no data received for " + nodeName);
logger.info("Pull no data received " + nodeName);
}
} catch (ConnectException ex) {
logger.warn(ErrorConstants.COULD_NOT_CONNECT_TO_TRANSPORT + " url=" + node.getSyncURL());
Expand Down
Expand Up @@ -110,7 +110,7 @@ private BatchInfo getBatchInfo(Map<String, Object> parameters, long batchId) {
batchInfo.setFilterMillis(getParamAsNum(parameters, WebConstants.ACK_FILTER_MILLIS + batchId));
batchInfo.setDatabaseMillis(getParamAsNum(parameters, WebConstants.ACK_DATABASE_MILLIS + batchId));
batchInfo.setByteCount(getParamAsNum(parameters, WebConstants.ACK_BYTE_COUNT + batchId));
String status = getParam(parameters, WebConstants.ACK_BATCH_NAME + batchId, "");
String status = getParam(parameters, WebConstants.ACK_BATCH_NAME + batchId, "").trim();
batchInfo.setOk(status.equalsIgnoreCase(WebConstants.ACK_BATCH_OK));

if (!batchInfo.isOk()) {
Expand Down
2 changes: 2 additions & 0 deletions symmetric/src/main/resources/symmetric-web.xml
Expand Up @@ -7,6 +7,8 @@
class="org.jumpmind.symmetric.transport.PullResourceHandler">
<property name="nodeService" ref="nodeService" />
<property name="registrationService" ref="registrationService" />
<property name="dataExtractorService" ref="dataExtractorService" />
<property name="dataService" ref="dataService" />
</bean>

<bean id="pushResourceHandler"
Expand Down

0 comments on commit 40ad506

Please sign in to comment.