String jndiPropertiesFileName = System.getProperty("perf.jndiProperties", "jndi.properties");
String jndiPropertiesFileName;
   public void setUp()   {      try      {               log.trace("Setting up PerfRunner");                  String jndiPropertiesFileName = System.getProperty("perf.jndiProperties", "jndi.properties");                  this.jndiProperties = loadProps(jndiPropertiesFileName);                  String perfPropertiesFileName = System.getProperty("perf.properties", "perf.properties");                  Properties perfProperties = loadProps(perfPropertiesFileName);                  connectionFactoryJndiName = perfProperties.getProperty("perf.connectionFactoryJndiName", "/ConnectionFactory");         queueName = perfProperties.getProperty("perf.queueName", "queue/perfTestQueue");         topicName = perfProperties.getProperty("perf.topicName", "topic/perfTestTopic");         subscriptionName = perfProperties.getProperty("perf.subscriptionName", "perfTestSub");               queueNamePrefix = perfProperties.getProperty("perf.queueNamePrefix", "queue/perfTestQueue");         topicNamePrefix = perfProperties.getProperty("perf.topicNamePrefix", "topic/perfTestTopic");         numMessages = new Integer(perfProperties.getProperty("perf.numMessages", "200")).intValue();         numWarmupMessages = new Integer(perfProperties.getProperty("perf.numWarmupMessages", "100")).intValue();         providerName = perfProperties.getProperty("perf.providerName", "JBossMessaging");         String dbURL = perfProperties.getProperty("perf.dbURL", "jdbc:hsqldb:hsql://localhost:7776");         scaleNumber = new Integer(perfProperties.getProperty("perf.scaleNumber", "8")).intValue();         standardMessageSize = new Integer(perfProperties.getProperty("perf.standardMessageSize", "1024")).intValue();         log.info(perfProperties.getProperty("perf.initialPause"));         initialPause = new Integer(perfProperties.getProperty("perf.initialPause", "5000")).intValue();         clientID = perfProperties.getProperty("perf.clientID", "perfTestClientID");         numSlaves = new Integer(perfProperties.getProperty("perf.numSlaves", "2")).intValue();            slaveURLs = new String[numSlaves];         for (int i = 0; i < numSlaves; i++)         {            slaveURLs[i] = perfProperties.getProperty("perf.slaveURL" + (i + 1), "socket://localhost:1234/?socketTimeout=0");         }                  //log.info("jndiServerURL:" + this.jndiServerURL);         log.info("jndiProperties file:" + jndiPropertiesFileName);         log.info("queueName:" + this.queueName);         log.info("topicName:" + this.topicName);         log.info("subscriptionName:" + this.subscriptionName);         log.info("queueNamePrefix:" + this.queueNamePrefix);         log.info("topicNamePrefix:" + this.topicNamePrefix);         log.info("numMessages:" + this.numMessages);         log.info("numWarmupMessages:" + this.numWarmupMessages);         log.info("providerName:" + this.providerName);         log.info("dbURL:" + dbURL);         log.info("scaleNumber:" + this.scaleNumber);         log.info("standardMessageSize:" + this.standardMessageSize);           log.info("InitialPause:" + this.initialPause);         log.info("clientID:" + this.clientID);         log.info("numSlaves:" + this.numSlaves);         for (int i = 0; i < numSlaves; i++)         {            log.info("slaveURL" + (i+1) + ":" + slaveURLs[i]);         }                                   pm = new JDBCPersistenceManager(dbURL);         pm.start();                  log.info("Draining queues");         drainQueue(queueName);                  for (int i = 0; i < scaleNumber; i++)         {            drainQueue(queueNamePrefix + i);         }         drainSubscription(topicName, subscriptionName, clientID);         log.info("Drained queues");      }      catch (Exception e)      {         log.error("Failed to setup", e);      }   }