From 91332cebf4c689d04c5b0fb190db06946bfb4773 Mon Sep 17 00:00:00 2001 From: Gary Date: Thu, 10 Sep 2015 09:39:12 +0100 Subject: [PATCH 1/2] second instance using same config, just new ports The previous example used a (copy of) the same file as the first instance. requiring a config edit. Alternative fix would be to include two loancalcX.yml files with different port mappings. --- loanFinal/readme.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loanFinal/readme.txt b/loanFinal/readme.txt index 97fe4c3..aee3b80 100644 --- a/loanFinal/readme.txt +++ b/loanFinal/readme.txt @@ -9,7 +9,7 @@ To run multiple instances of the service with different .yml. java -jar build/libs/loancalc.jar server build/resources/main/loancalc.yml - To run 2nd instance on a different port, run: - java -Ddropwizard.config=src/main/resources/loancalc.yml -jar build/libs/hello-world.jar + java -jar build/libs/loancalc.jar server build/resources/main/loancalc.yml -Ddw.server.applicationConnectors[0].port=9090 -Ddw.server.adminConnectors[0].port=9091 - Access the URL by doing: http://localhost:9000/loan //this returns calculation based on defaults of 15000, 3.0 and 60 @@ -30,4 +30,4 @@ To run multiple instances of the service with different .yml. - Access the webapp from your browser http://localhost:8888/loan/loan.html -- Review loan.html \ No newline at end of file +- Review loan.html From 1f6d1c7e22ad14b6e24c40893947fda35edd3192 Mon Sep 17 00:00:00 2001 From: Gary Date: Thu, 10 Sep 2015 10:21:52 +0100 Subject: [PATCH 2/2] Fixed param order --- loanFinal/readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loanFinal/readme.txt b/loanFinal/readme.txt index aee3b80..e1a7cf0 100644 --- a/loanFinal/readme.txt +++ b/loanFinal/readme.txt @@ -9,7 +9,7 @@ To run multiple instances of the service with different .yml. java -jar build/libs/loancalc.jar server build/resources/main/loancalc.yml - To run 2nd instance on a different port, run: - java -jar build/libs/loancalc.jar server build/resources/main/loancalc.yml -Ddw.server.applicationConnectors[0].port=9090 -Ddw.server.adminConnectors[0].port=9091 + java -Ddw.server.applicationConnectors[0].port=9090 -Ddw.server.adminConnectors[0].port=9091 -jar build/libs/loancalc.jar server build/resources/main/loancalc.yml - Access the URL by doing: http://localhost:9000/loan //this returns calculation based on defaults of 15000, 3.0 and 60