From 6d27310b2cdbd6f412157eee25cc68df9486db14 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 27 Nov 2019 17:22:13 +0100 Subject: Parametrize RMI host (#43) --- src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java | 3 ++- src/main/resources/application.properties | 1 + .../resources/pl/edu/mimuw/cloudatlas/client/application.properties | 2 -- src/main/resources/pl/edu/mimuw/cloudatlas/fetcher/fetcher.policy | 3 --- 4 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 src/main/resources/pl/edu/mimuw/cloudatlas/client/application.properties delete mode 100644 src/main/resources/pl/edu/mimuw/cloudatlas/fetcher/fetcher.policy (limited to 'src/main') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java index 557ba39..db9c09f 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java @@ -34,7 +34,8 @@ public class ClientController { ClientController() { try { - Registry registry = LocateRegistry.getRegistry("localhost"); + String hostname = System.getProperty("agent_hostname"); + Registry registry = LocateRegistry.getRegistry(hostname); this.api = (Api) registry.lookup("Api"); } catch (Exception e) { System.err.println("Client exception:"); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 9cbc2e8..bb48ff5 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,3 +1,4 @@ +server.port=0 spring.application.name=CloudAtlas Client spring.thymeleaf.cache=false diff --git a/src/main/resources/pl/edu/mimuw/cloudatlas/client/application.properties b/src/main/resources/pl/edu/mimuw/cloudatlas/client/application.properties deleted file mode 100644 index 5d26214..0000000 --- a/src/main/resources/pl/edu/mimuw/cloudatlas/client/application.properties +++ /dev/null @@ -1,2 +0,0 @@ -server.port=8081 -spring.application.name=CloudAtlas Client diff --git a/src/main/resources/pl/edu/mimuw/cloudatlas/fetcher/fetcher.policy b/src/main/resources/pl/edu/mimuw/cloudatlas/fetcher/fetcher.policy deleted file mode 100644 index 5d74bde..0000000 --- a/src/main/resources/pl/edu/mimuw/cloudatlas/fetcher/fetcher.policy +++ /dev/null @@ -1,3 +0,0 @@ -grant { - permission java.security.AllPermission; -}; \ No newline at end of file -- cgit v1.2.3