mastodon: 4.3.1 -> 4.3.2 (#361487)
[NixPkgs.git] / nixos / modules / services / amqp / activemq / ActiveMQBroker.java
blobc0f5d16ea11ab64a0aaa870daf6718f297cb1a5c
1 import org.apache.activemq.broker.BrokerService;
2 import org.apache.activemq.broker.BrokerFactory;
3 import java.net.URI;
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);
10 broker.start();
11 if (broker.waitUntilStarted()) {
12 broker.waitUntilStopped();
13 } else {
14 System.out.println("Failed starting broker");
15 System.exit(-1);