use of org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager in project activemq-artemis by apache.
the class JMSSecurityTest method testCreateQueueConnection.
@Test
public void testCreateQueueConnection() throws Exception {
ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
securityManager.getConfiguration().addUser("IDo", "Exist");
try {
QueueConnection queueC = ((QueueConnectionFactory) cf).createQueueConnection("IDont", "Exist");
fail("supposed to throw exception");
queueC.close();
} catch (JMSSecurityException e) {
// expected
}
JMSContext ctx = cf.createContext("IDo", "Exist");
ctx.close();
}
Aggregations