public static void main(String[] args) throws Exception {
System.out.println("Connecting to JMS server.");
factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
Destination inQueue = new ActiveMQQueue("demo.org.servicemix.source");
Destination outQueue = new ActiveMQQueue("demo.org.servicemix.output" + (int)(1000*Math.random()));
requestor = MultiplexingRequestor.newInstance(factory, new JmsProducerConfig(), inQueue, outQueue);
if (args.length == 0) {
new JMSClient().run();
} else {
int nb = Integer.parseInt(args[0]);