depot/nixos/modules/services/amqp/activemq/ActiveMQBroker.java
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

19 lines
538 B
Java

import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.BrokerFactory;
import java.net.URI;
public class ActiveMQBroker {
public static void main(String[] args) throws Throwable {
URI uri = new URI((args.length > 0) ? args[0] : "xbean:activemq.xml");
BrokerService broker = BrokerFactory.createBroker(uri);
broker.start();
if (broker.waitUntilStarted()) {
broker.waitUntilStopped();
} else {
System.out.println("Failed starting broker");
System.exit(-1);
};
}
}