HornetQSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
securityManager.addUser("guest", "guest");
securityManager.addRole("guest", "guest");
securityManager.setDefaultUser("guest");
Role role = new Role("arole", false, false, false, false, false, false, false);
System.out.println("guest:" + role);
Role sendRole = new Role("guest", true, false, true, false, false, false, false);
System.out.println("guest:" + sendRole);
Role receiveRole = new Role("receiver", false, true, false, false, false, false, false);
System.out.println("guest:" + receiveRole);
Set<Role> roles = new HashSet<Role>();
roles.add(sendRole);
roles.add(role);
roles.add(receiveRole);