use of org.apache.activemq.artemis.rest.integration.EmbeddedRestActiveMQJMS in project activemq-artemis by apache.
the class EmbeddedTest method startEmbedded.
@BeforeClass
public static void startEmbedded() throws Exception {
server = new EmbeddedRestActiveMQJMS(null);
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");
}
Aggregations