org.apache.activemq.artemis.rest.MessageServiceManager

Here are the examples of the java api class org.apache.activemq.artemis.rest.MessageServiceManager taken from open source projects.

1. RestMessagingBootstrapListener#contextInitialized()

View license
@Override
public void contextInitialized(ServletContextEvent contextEvent) {
    ServletContext context = contextEvent.getServletContext();
    String configfile = context.getInitParameter("rest.messaging.config.file");
    Registry registry = (Registry) context.getAttribute(Registry.class.getName());
    if (registry == null) {
        throw new RuntimeException("You must install RESTEasy as a Bootstrap Listener and it must be listed before this class");
    }
    manager = new MessageServiceManager();
    if (configfile != null) {
        manager.setConfigResourcePath(configfile);
    }
    try {
        manager.start();
        registry.addSingletonResource(manager.getQueueManager().getDestination());
        registry.addSingletonResource(manager.getTopicManager().getDestination());
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}

2. PersistentPushQueueConsumerTest#startup()

View license
public static void startup() throws Exception {
    Configuration configuration = new ConfigurationImpl().setPersistenceEnabled(false).setSecurityEnabled(false).addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
    activeMQServer = ActiveMQServers.newActiveMQServer(configuration);
    activeMQServer.start();
    deployment = EmbeddedContainer.start();
    manager = new MessageServiceManager();
    manager.start();
    deployment.getRegistry().addSingletonResource(manager.getQueueManager().getDestination());
    deployment.getRegistry().addSingletonResource(manager.getTopicManager().getDestination());
}

3. PersistentPushTopicConsumerTest#startup()

View license
public static void startup() throws Exception {
    deployment = EmbeddedContainer.start();
    manager = new MessageServiceManager();
    manager.start();
    deployment.getRegistry().addSingletonResource(manager.getQueueManager().getDestination());
    deployment.getRegistry().addSingletonResource(manager.getTopicManager().getDestination());
    deployment.getRegistry().addPerRequestResource(Receiver.class);
}