Here are the examples of the java api class org.apache.activemq.artemis.rest.MessageServiceManager taken from open source projects.
1. PersistentPushQueueConsumerTest#startup()
Project: activemq-artemis
File: PersistentPushQueueConsumerTest.java
File: PersistentPushQueueConsumerTest.java
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()); }
2. RestMessagingBootstrapListener#contextInitialized()
Project: activemq-artemis
File: RestMessagingBootstrapListener.java
File: RestMessagingBootstrapListener.java
@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); } }
3. PersistentPushTopicConsumerTest#startup()
Project: activemq-artemis
File: PersistentPushTopicConsumerTest.java
File: PersistentPushTopicConsumerTest.java
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); }