org.apache.activemq.artemis.rest.integration.EmbeddedRestActiveMQJMS

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

1. EmbeddedTest#startEmbedded()

Project: activemq-artemis
Source File: EmbeddedTest.java
View license
@BeforeClass
public static void startEmbedded() throws Exception {
    server = new EmbeddedRestActiveMQJMS();
    server.getManager().setConfigResourcePath("activemq-rest.xml");
    SecurityConfiguration securityConfiguration = new SecurityConfiguration();
    securityConfiguration.addUser("guest", "guest");
    securityConfiguration.addRole("guest", "guest");
    securityConfiguration.setDefaultUser("guest");
    ActiveMQJAASSecurityManager securityManager = new ActiveMQJAASSecurityManager(InVMLoginModule.class.getName(), securityConfiguration);
    server.getEmbeddedJMS().setSecurityManager(securityManager);
    server.start();
    List<String> connectors = new ArrayList<>();
    connectors.add("in-vm");
    server.getEmbeddedJMS().getJMSServerManager().createConnectionFactory("ConnectionFactory", false, JMSFactoryType.CF, connectors, "ConnectionFactory");
}