1 Reply Latest reply on Jan 4, 2010 1:39 AM by Yong Hao Gao

    How to create users/roles for remote queues?

    Maciej Skorupka Newbie

      Hi,

       

      we're doing a project that uses two clustered JBoss 5.1 as JMS server that is persistent using MySQL. We have a queue there. We also have a JMS producer (ECM) on another JBoss (no clustering, plain JBoss 5.1) that has local queue that is bridged there to queue on cluster. We also have another JBoss 5.1 that is a receiver (PRM) of those messages (another bridge created in the same manner).

       

      We have a problem with a fact that producer can't be authenticated. We think that there's a problem with configuration.

       

      We have a queue on cluster defined in destinations-service.xml:

       

      <mbean code="org.jboss.jms.server.destination.QueueService"
              name="jboss.messaging.destination:service=Queue,name=ECM-PRM-Queue"
              xmbean-dd="xmdesc/Queue-xmbean.xml">
          <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
          <depends>jboss.messaging:service=PostOffice</depends>
          <attribute name="Clustered">true</attribute>
          <attribute name="SecurityConfig">
              <security>
                  <role name="ecm-role" write="true" create="true" />
                  <role name="prm-role" read="true" create="true" />
              </security>
          </attribute>

       

      And those roles and users are defined in mysql-persistence-service.xml (in <mbean code="org.jboss.jms.server.plugin.JDBCJMSUserManagerService"
            name="jboss.messaging:service=JMSUserManager"
            xmbean-dd="xmdesc/JMSUserManager-xmbean.xml">):

       

      POPULATE.TABLES.15 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('ecm-role','ecm-user')
      POPULATE.TABLES.16 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('prm-role','prm-user')
      POPULATE.TABLES.17  = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('ecm-user', 'ecm-user')
      POPULATE.TABLES.18 = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('prm-user', 'prm-user')

       

       

      Is this the way that queue, users and roles should be created? Maybe we're doing something in a bad place.

       

      Thanks in advance.