1 import org
.apache
.activemq
.broker
.BrokerService
;
2 import org
.apache
.activemq
.broker
.BrokerFactory
;
5 public class ActiveMQBroker
{
7 public static void main(String
[] args
) throws Throwable
{
8 URI uri
= new URI((args
.length
> 0) ? args
[0] : "xbean:activemq.xml");
9 BrokerService broker
= BrokerFactory
.createBroker(uri
);
11 if (broker
.waitUntilStarted()) {
12 broker
.waitUntilStopped();
14 System
.out
.println("Failed starting broker");