[Beginners Corner] - Re: how to create new user for durable topic subscriber lik
by PeterJ
Oops, I thought you were using JBoss Messaging, but you are using JBossMQ.
I will assume you are using the Hypersonic database (that is the default). Look at server/default/deploy/jms/hsqldb-jdbc-state-service.xml, you will see these lines:
POPULATE.TABLES.03 = INSERT INTO JMS_USERS (USERID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample')
| POPULATE.TABLES.04 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('nobody', 'nobody')
| POPULATE.TABLES.05 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('dynsub', 'dynsub')
| POPULATE.TABLES.06 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('guest','guest')
| POPULATE.TABLES.07 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('j2ee','guest')
| POPULATE.TABLES.08 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('john','guest')
| POPULATE.TABLES.09 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('subscriber','john')
| POPULATE.TABLES.10 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','john')
| POPULATE.TABLES.11 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','dynsub')
| POPULATE.TABLES.12 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','john')
Note the line that creates the john/needle account, and the line that adds john to the durpublisher group. Add the following lines:
POPULATE.TABLES.15 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('jmsuser', 'durable')
| POPULATE.TABLES.16 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','jmsuser')
Then delete the directory server/default/data. Fianlly start the app server.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144538#4144538
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4144538
18 years, 3 months
[Beginners Corner] - Re: how to create new user for durable topic subscriber lik
by arvind_agg
For creating a new user for durable subscriber I had to make some changes in 'hsqldb-jdbc-state-service.xml' (default/deplo/jms). If you have not made any changes for the db to maintian state then you can add a new user by adding below mentioned statements.
POPULATE.TABLES.15 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('scott', 'tiger')
POPULATE.TABLES.16 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('scott','guest')
POPULATE.TABLES.17 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('subscriber','scott')
POPULATE.TABLES.18 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','scott')
POPULATE.TABLES.19 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','scott'
You can substitue scott/tiger with your username and pwd. Atleast this does works for me.
-Arvind
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144529#4144529
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4144529
18 years, 3 months