I' m using j2ee, and I'm building an application that lookup TopicConnectionFactory and Topic from a Context without authentication. But I would want cofigure J2ee or Jms (?) to give permissions to only I want. I have seen that there is a file named auth.properties in which probably I must to change something but I don' t know what. This is the file : realms=default,certificate realm.default=config/realms/default.properties realm.certificate=config/realms/certificate.properties default.principal.name=guest default.principal.password=guest123 anyone.role.name=Prova.java audit=false If you can help me, thanks
If you want to restrict the subscribers to a particular topic, then a username and password can be used to establish the unique identity of the subscriber. This can be done as follows. j2eeadmin -addJmsFactory MY_CON_FAC topic -props clientId=MyID here, MY_CON_FAC is the name of the ConnectionFactory you create for a topic. set the property 'clientId' to that of the authorized subscriber. In the subscriber program, when you create a durable subscriber using the createDurableSubscriber() method with two arguments, the topic and a string that specifies the name of the subscription: String subName = "MySub"; TopicSubscriber topicSubscriber = topicSession.createDurableSubscriber(myTopic, subName); Hope this helps.