I have a Topic that defined some security roles for accessing like:
In my code I want to be able to call:
connectionFactory.createTopicConnection() [without any username/password arguments]
to get a handle on a topic connection to publish messages to. Unfortunately I get an access error saying that I don't have permission to publish to this topic. If I pass in a user name and password to the createTopicConnection(username, password) method with a user that is in the publisher role then all works.
My question is the JavaDocs for createTopicConnection() says that it will "Creates a topic connection with the default user identity". How do I setup the default user identity so I don't have to specify a username/password in my code?
Sorry didn't put around code brackets.
<attribute name="SecurityConf"> <security> <role name="publisher" read="true" write="true" create="true"/> <role name="subscriber" read="true" write="false" create="false"/> </security> </attribute>