runJob(createDefaultDrainJob(queueName)); warmupDestination(queueName, standardMessageSize, true, DeliveryMode.PERSISTENT, Session.SESSION_TRANSACTED);  SenderJob sender = createDefaultSenderJob(queueName); sender.setNumMessages(numMessages); sender.setMsgSize(standardMessageSize); sender.setMf(new BytesMessageMessageFactory()); sender.setTransacted(true); sender.setTransactionSize(100); sender.setDeliveryMode(DeliveryMode.PERSISTENT);  long result = runJob(sender).getTestTime();  Execution execution = createExecution("Queue4");  execution.addMeasurement(new Measurement("msgsSentPerSec", 1000 * (double)numMessages / result)); pm.saveExecution(execution);  log.info("Test Queue4 finished");
try { SenderJob sender = createDefaultSenderJob(queueName); sender.setNumMessages(numMessages); sender.setMsgSize(standardMessageSize); sender.setMf(new BytesMessageMessageFactory()); sender.setTransacted(true); sender.setTransactionSize(100); sender.setDeliveryMode(DeliveryMode.PERSISTENT);  JobResult res = runJob(sender);  if (!checkResult(res, "Queue4")) { return; }  long result = res.testTime;  Execution execution = createExecution("Queue4");  execution.addMeasurement(new Measurement("msgsSentPerSec", 1000 * (double)numMessages / result)); pm.saveExecution(execution);  log.info("Test Queue4 finished"); } finally { drainQueue(queueName); }
   public void testQueue4()   {      log.info("Running test Queue4");            //First drain the destination      runJob(createDefaultDrainJob(queueName));      warmupDestination(queueName, standardMessageSize, true, DeliveryMode.PERSISTENT, Session.SESSION_TRANSACTED);            SenderJob sender = createDefaultSenderJob(queueName);      sender.setNumMessages(numMessages);      sender.setMsgSize(standardMessageSize);      sender.setMf(new BytesMessageMessageFactory());      sender.setTransacted(true);      sender.setTransactionSize(100);      sender.setDeliveryMode(DeliveryMode.PERSISTENT);            long result = runJob(sender).getTestTime();            Execution execution = createExecution("Queue4");            execution.addMeasurement(new Measurement("msgsSentPerSec", 1000 * (double)numMessages / result));      pm.saveExecution(execution);            log.info("Test Queue4 finished");   }