1 Reply Latest reply on Feb 3, 2008 9:25 AM by timfox

    What does JMSUserManager do?

    sappenin

      I'm using jboss-messaging, and am wondering what the difference between the JMSUserManager and the 'messaging' application-policy defined in login-conf.xml is. Which one determines my users/roles???

      I'm using Mysql for persistent messaging, and in the file called server/deploy/jboss-messaging.sar/mysql-persistence-service.xml, at the bottom, is an mbean that seems to also define users/roles.

      Do I need to use both?

      <mbean code="org.jboss.jms.server.plugin.JDBCJMSUserManagerService"
       name="jboss.messaging:service=JMSUserManager"
       xmbean-dd="xmdesc/JMSUserManager-xmbean.xml">
       <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
       <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
       <attribute name="DataSource">java:/DefaultDS</attribute>
       <attribute name="CreateTablesOnStartup">true</attribute>
       <attribute name="SqlProperties"><![CDATA[
      CREATE_USER_TABLE=CREATE TABLE JBM_USER (USER_ID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, CLIENTID VARCHAR(128), PRIMARY KEY(USER_ID)) ENGINE = INNODB
      CREATE_ROLE_TABLE=CREATE TABLE JBM_ROLE (ROLE_ID VARCHAR(32) NOT NULL, USER_ID VARCHAR(32) NOT NULL, PRIMARY KEY(USER_ID, ROLE_ID)) ENGINE = INNODB
      SELECT_PRECONF_CLIENTID=SELECT CLIENTID FROM JBM_USER WHERE USER_ID=?
      POPULATE.TABLES.1=INSERT INTO JBM_USER (USER_ID,PASSWD,CLIENTID) VALUES ('dilbert','dogbert','dilbert-id')
       ]]></attribute>
       </mbean>
      



        • 1. Re: What does JMSUserManager do?
          timfox

          JMSUserManager is really an artifact from JBoss MQ days. It maintains a mapping of user->preconfigured client id.

          If there is an entry for a user, then when the user creates a connection, the server will preconfigure that connection with that client id.

          If you don't want that functionality you can ignore it.

          User, role authentication is done using the messaging JAAS domain.