From eca6f937eeb78f547501a1d73c9139e93d6ef250 Mon Sep 17 00:00:00 2001 From: Jan Vales Date: Sun, 9 Jun 2013 15:50:13 +0200 Subject: [PATCH] [JMS] script to start scenario2. --- runJMS.sh | 48 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/runJMS.sh b/runJMS.sh index 3496653..3e64720 100755 --- a/runJMS.sh +++ b/runJMS.sh @@ -1,8 +1,42 @@ #!/bin/bash -mvn activemq:run & -mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.pizzeria.PizzeriaAgent" -Dexec.args="JMS" & -mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.group.GroupAgent" -Dexec.args="JMS" & -mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.waiter.WaiterAgent" -Dexec.args="JMS 1" & -mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.waiter.WaiterAgent" -Dexec.args="JMS 2" & -mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.cook.CookAgent" -Dexec.args="JMS 3" & -mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.cook.CookAgent" -Dexec.args="JMS 4" & +mvn package + +# Run all the brokers +# nameservice + management (hardcoded) +mvn exec:java -Dexec.mainClass="org.apache.activemq.console.Main" -Dexec.args="start broker:(tcp://localhost:61610)?useJmx=true&persistent=false" & + +# failunsafe pizzatarget +mvn exec:java -Dexec.mainClass="org.apache.activemq.console.Main" -Dexec.args="start broker:(tcp://localhost:61611)?useJmx=true&persistent=false" & + +#pizzaria 1 +mvn exec:java -Dexec.mainClass="org.apache.activemq.console.Main" -Dexec.args="start broker:(tcp://localhost:61621)?useJmx=true&persistent=false" & + +#pizzaria 2 +mvn exec:java -Dexec.mainClass="org.apache.activemq.console.Main" -Dexec.args="start broker:(tcp://localhost:61622)?useJmx=true&persistent=false" & + + +# wait for broakers to start +sleep 30 + + +# Run Groupgui +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.group.GroupAgent" -Dexec.args="JMS" + +#run pizzeria1 +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.pizzeria.PizzeriaAgent" -Dexec.args="JMS tcp://localhost:61621?jms.prefetchPolicy.all=1" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.waiter.WaiterAgent" -Dexec.args="JMS tcp://localhost:61621?jms.prefetchPolicy.all=1 1" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.waiter.WaiterAgent" -Dexec.args="JMS tcp://localhost:61621?jms.prefetchPolicy.all=1 2" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.cook.CookAgent" -Dexec.args="JMS tcp://localhost:61621?jms.prefetchPolicy.all=1 3" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.cook.CookAgent" -Dexec.args="JMS tcp://localhost:61621?jms.prefetchPolicy.all=1 4" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.driver.DriverAgent" -Dexec.args="JMS tcp://localhost:61621?jms.prefetchPolicy.all=1 5" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.driver.DriverAgent" -Dexec.args="JMS tcp://localhost:61621?jms.prefetchPolicy.all=1 6" & + +#run pizzeria2 +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.pizzeria.PizzeriaAgent" -Dexec.args="JMS tcp://localhost:61622?jms.prefetchPolicy.all=1" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.waiter.WaiterAgent" -Dexec.args="JMS tcp://localhost:61622?jms.prefetchPolicy.all=1 1" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.waiter.WaiterAgent" -Dexec.args="JMS tcp://localhost:61622?jms.prefetchPolicy.all=1 2" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.cook.CookAgent" -Dexec.args="JMS tcp://localhost:61622?jms.prefetchPolicy.all=1 3" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.cook.CookAgent" -Dexec.args="JMS tcp://localhost:61622?jms.prefetchPolicy.all=1 4" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.driver.DriverAgent" -Dexec.args="JMS tcp://localhost:61622?jms.prefetchPolicy.all=1 5" & +mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.driver.DriverAgent" -Dexec.args="JMS tcp://localhost:61622?jms.prefetchPolicy.all=1 6" & + -- 2.43.0