// String brokerDir = "xbean:...;
// System.setProperty("activemq.base", brokerDir);
// BrokerService broker = BrokerFactory.createBroker(new URI(brokerDir + "/activemq.xml"));
// for running on Java 5 without mx4j
ManagementContext managementContext = broker.getManagementContext();
managementContext.setFindTigerMbeanServer(true);
managementContext.setUseMBeanServer(true);
managementContext.setCreateConnector(false);
broker.setUseJmx(true);
// broker.setPlugins(new BrokerPlugin[] { new
// ConnectionDotFilePlugin(), new UDPTraceBrokerPlugin() });
broker.addConnector("tcp://localhost:61616");