5.6. Configuring the JMS user manager

The JMS User Manager maps preconfigured client IDs to users. It also manages user and role tables, depending on the configured login module.
The following is an example JMSUserManager configuration:
<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">
    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 ('jdoe','jdoepw','jdoe-id')   
  </attribute>
</mbean>

5.6.1. JMSUserManager Managed Bean Attributes

CreateTablesOnStartup
Specifies whether tables and index creation is attempted when the JMSUserManager MBean is started. When set to true (default), the JMSUserManager will attempt to create tables (and indexes) on startup. If tables or indexes already exist, a SQLException will be thrown by the JDBC driver and ignored by the persistence manager, allowing it to continue unhindered.
UsingBatchUpdates
Specifies whether multiple database updates are grouped in batches to improve performance. Set this value to true if your database supports JDBC batch updates. The default value is false.
SQLProperties
Specifies the DDL and DML for a particular database. If a particular DDL or DML statement is not overridden, the default Hypersonic configuration will be used for that statement.
You can also insert default user and role property data by prefixing the data with POPULATE.TABLES.