3 Replies Latest reply on May 27, 2004 5:43 PM by Adrian Brock

    JDBCStateManager. Modifiying the default config seems not to

    Olaso Newbie

      JBoss 3.2.4RC2

      In the file: hssql-jdbc-state-service.xml the default config is:

      <!-- A Statemanager that stores state in the database -->
       <mbean code="org.jboss.mq.sm.jdbc.JDBCStateManager"
       name="jboss.mq:service=StateManager">
       <depends optional-attribute-name="ConnectionManager">jboss.jca:service=LocalTxCM,name=DefaultDS</depends>
       <attribute name="SqlProperties">...


      If I change the DefaultDS and I use there my datasource for sqlserver (I'm sure that the datasource works properly), for example:

      <!-- A Statemanager that stores state in the database -->
       <mbean code="org.jboss.mq.sm.jdbc.JDBCStateManager"
       name="jboss.mq:service=StateManager">
       <depends optional-attribute-name="ConnectionManager">jboss.jca:service=LocalTxCM,name=MSSQLDS</depends>
       <attribute name="SqlProperties">...


      It creates the tables in the DB and seems to work ok.

      After that I modified the login-config.xml in order to use the same datasource, so I wrote:

      <!-- Security domain for JBossMQ -->
       <application-policy name = "jbossmq">
       <authentication>
       <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
       flag = "required">
       <module-option name = "unauthenticatedIdentity">guest</module-option>
       <module-option name = "dsJNDI">java:/MSSQLDS</module-option>
       <module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
       <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option>
       </login-module>
       </authentication>
       </application-policy>


      But it still tries to recover user and password from the hssql database, that is from the default datasource DefaultDS.

      Is that a bug, or I have to modify anything else?

      Thanks in advance