I changed how I am creating my topics at runtime. see listing below. Now when I log in with a user and an incorrect password, I get the error that that user was nt authenticated. If I use the correct password i get the following:
javax.jms.JMSSecurityException: Connection not authorized to subscribe to destination: topic/table1 at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:141) at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:816) at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:297) at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:166) at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:369) at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748) at java.lang.Thread.run(Thread.java:595)
serverName = InetAddress.getLocalHost().getHostName(); RMIAdaptor server = (RMIAdaptor) ctx .lookup("jmx/invoker/RMIAdaptor"); ObjectName dm = new ObjectName( "jboss.mq:service=DestinationManager"); server.invoke(dm, "createTopic", new Object[] { topicJndiName, topicJndiName }, new String[] { String.class.getName(), String.class.getName() });
I figured it out. My Secuirty Manager was missing the the two roles i needed.