You pass it in when creating your topicConnection:
topicConnection = topicConnectionFactory.createTopicConnection("john", "needle");
Oooops, I mis-understood your question.
You modify the "jbossmq-state.xml" file. It's under the "jboss-3.X.X/server/default/conf" directory. Once you open it, you'll figure it out.
No, you modify the security config on the topic such that is allows one of the roles
assigned to the user.