Repository: incubator-unomi Updated Branches: refs/heads/master d40d3a48a -> 1bbda7bed
DMF-1455 : Internal address (Bug: running route won't be update) Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/1bbda7be Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/1bbda7be Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/1bbda7be Branch: refs/heads/master Commit: 1bbda7bed6f855a9d31025b9afa213a900d0bea8 Parents: d40d3a4 Author: Abdelkader Midani <[email protected]> Authored: Wed Sep 27 18:26:49 2017 +0200 Committer: Abdelkader Midani <[email protected]> Committed: Wed Sep 27 18:26:49 2017 +0200 ---------------------------------------------------------------------- .../unomi/router/rest/ExportConfigurationServiceEndPoint.java | 4 ++-- .../unomi/router/rest/ImportConfigurationServiceEndPoint.java | 4 ++-- services/src/main/resources/OSGI-INF/blueprint/blueprint.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1bbda7be/extensions/router/router-rest/src/main/java/org/apache/unomi/router/rest/ExportConfigurationServiceEndPoint.java ---------------------------------------------------------------------- diff --git a/extensions/router/router-rest/src/main/java/org/apache/unomi/router/rest/ExportConfigurationServiceEndPoint.java b/extensions/router/router-rest/src/main/java/org/apache/unomi/router/rest/ExportConfigurationServiceEndPoint.java index 9995668..366049f 100644 --- a/extensions/router/router-rest/src/main/java/org/apache/unomi/router/rest/ExportConfigurationServiceEndPoint.java +++ b/extensions/router/router-rest/src/main/java/org/apache/unomi/router/rest/ExportConfigurationServiceEndPoint.java @@ -84,7 +84,7 @@ public class ExportConfigurationServiceEndPoint extends AbstractConfigurationSer ExportConfiguration exportConfigSaved = configurationService.save(exportConfiguration); CloseableHttpClient httpClient = HttpClients.createDefault(); try { - HttpPut httpPut = new HttpPut("http://localhost:" + configSharingService.getProperty("internalServerPort") + "/configUpdate/exportConfigAdmin"); + HttpPut httpPut = new HttpPut(configSharingService.getProperty("internalServerAddress") + "/configUpdate/exportConfigAdmin"); StringEntity input = new StringEntity(new ObjectMapper().writeValueAsString(exportConfigSaved)); input.setContentType(MediaType.APPLICATION_JSON); httpPut.setEntity(input); @@ -93,7 +93,7 @@ public class ExportConfigurationServiceEndPoint extends AbstractConfigurationSer if (response.getStatusLine().getStatusCode() != 200) { logger.error("Failed to update the running config: Please check the acceccibilty to the URI: \n{}", - "http://localhost:" + configSharingService.getProperty("internalServerPort") + "/configUpdate/importConfigAdmin"); + configSharingService.getProperty("internalServerAddress") + "/configUpdate/importConfigAdmin"); logger.error("HTTP Status code returned {}", response.getStatusLine().getStatusCode()); throw new PartialContentException("RUNNING_CONFIG_UPDATE_FAILED"); } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1bbda7be/extensions/router/router-rest/src/main/java/org/apache/unomi/router/rest/ImportConfigurationServiceEndPoint.java ---------------------------------------------------------------------- diff --git a/extensions/router/router-rest/src/main/java/org/apache/unomi/router/rest/ImportConfigurationServiceEndPoint.java b/extensions/router/router-rest/src/main/java/org/apache/unomi/router/rest/ImportConfigurationServiceEndPoint.java index 2087e53..7cc6b4e 100644 --- a/extensions/router/router-rest/src/main/java/org/apache/unomi/router/rest/ImportConfigurationServiceEndPoint.java +++ b/extensions/router/router-rest/src/main/java/org/apache/unomi/router/rest/ImportConfigurationServiceEndPoint.java @@ -74,7 +74,7 @@ public class ImportConfigurationServiceEndPoint extends AbstractConfigurationSer ImportConfiguration importConfigSaved = configurationService.save(importConfiguration); CloseableHttpClient httpClient = HttpClients.createDefault(); try { - HttpPut httpPut = new HttpPut("http://localhost:" + configSharingService.getProperty("internalServerPort") + "/configUpdate/importConfigAdmin"); + HttpPut httpPut = new HttpPut(configSharingService.getProperty("internalServerAddress") + "/configUpdate/importConfigAdmin"); StringEntity input = new StringEntity(new ObjectMapper().writeValueAsString(importConfigSaved)); input.setContentType(MediaType.APPLICATION_JSON); httpPut.setEntity(input); @@ -83,7 +83,7 @@ public class ImportConfigurationServiceEndPoint extends AbstractConfigurationSer if (response.getStatusLine().getStatusCode() != 200) { logger.error("Failed to update the running config: Please check the accessibility to the URI: \n{}", - "http://localhost:" + configSharingService.getProperty("internalServerPort") + "/configUpdate/importConfigAdmin"); + configSharingService.getProperty("internalServerAddress") + "/configUpdate/importConfigAdmin"); logger.error("HTTP Status code returned {}", response.getStatusLine().getStatusCode()); throw new PartialContentException("RUNNING_CONFIG_UPDATE_FAILED"); } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1bbda7be/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml ---------------------------------------------------------------------- diff --git a/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml index fafb5fd..75fbc01 100644 --- a/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ b/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml @@ -230,7 +230,7 @@ <bean id="configSharingServiceImpl" class="org.apache.unomi.services.services.ConfigSharingServiceImpl" destroy-method="preDestroy"> <property name="configProperties"> <map> - <entry key="internalServerPort" value="${cluster.contextserver.port}" /> + <entry key="internalServerAddress" value="${cluster.contextserver.internalAddress}" /> </map> </property> <property name="bundleContext" ref="blueprintBundleContext"/>
