try
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
HornetQSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, true, false, false, false, false);
Set<Role> roles = new HashSet<Role>();
roles.add(role);
securityRepository.addMatch(SecurityTest.addressA, roles);
securityManager.addRole("auser", "arole");
locator.setBlockOnNonDurableSend(true);
ClientSessionFactory cf = locator.createSessionFactory();
ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
session.createQueue(SecurityTest.addressA, SecurityTest.queueA, true);
ClientProducer cp = session.createProducer(SecurityTest.addressA);