1 package at.ac.tuwien.sbc.valesriegler.balancer;
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
7 * BalancerAgent parses the arguments and runs the JMS/XVSMDriver with the given ID.
12 public class BalancerAgent {
13 private static final String USAGE = "This application needs exactly 2 parameters: <\"XVSM\"|\"JMS\"> <XVSM-Space-Identifier|JMS-Naming-Service-URL>";
14 private static final Logger log = LoggerFactory.getLogger(BalancerAgent.class);
16 public static void main(String[] args) throws Exception {
17 if (args.length != 2) {
18 throw new IllegalArgumentException(USAGE);
24 parsedId = Integer.parseInt(args[2]);
25 } catch (NumberFormatException e) {
30 log.info("Middleware: " + mw + " ID:" + parsedId);
31 if ("JMS".equalsIgnoreCase(mw)) {
33 } else if ("XVSM".equalsIgnoreCase(mw)) {
36 throw new IllegalArgumentException(USAGE);