1 Reply Latest reply on Mar 29, 2010 3:10 PM by bsullivan3333

    JBoss 5.0.0.GA datasource security-domain and login-config.xml

    jcaito

      Running into an issue where our datasources for two different DBMS (MS-SQLServer and Informix) are not picking up the security-domain configuration in the login-config.xml file.

       

      Our datasource looks like this:

       

      <datasources>
        <local-tx-datasource>
          <jndi-name>cvars</jndi-name>
          <connection-url>jdbc::sqlserver://localhost:59778;DatabaseName=clientvarsuuid</connection-url>
      
          <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
          <security-domain>MSSQLDS</security-domain>
            <metadata>
               <type-mapping>MS SQLSERVER2000</type-mapping>
            </metadata>
        </local-tx-datasource>
      </datasources>
      

       

      And an entry in login-config.xml:

       

       

        <application-policy name="MSSQLDS">
          <authentication>
            <login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
              <module-option name="userName">uismca1w</module-option>
              <module-option name="password">55de9efb3f6068b88187c12a3970df95</module-option>
              <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=cvars</module-option>
            </login-module>
          </authentication>
        </application-policy>
      

       

      and I keep receiving this error:

       


      13:25:23,053 WARN  [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user ''. The user is not associated with a trusted SQL Server connection.)

       

      Now if, we comment out the security-domain element in the *-ds.xml file and replace it with a simple user name and a clear text password the datasource works. We're using the 'all' server configuration in JBoss. We've made sure that login-config.xml is getting loaded on start-up. And the hqsqldb-ds.xml using the security-domain element works. But using our added application-policy to the login-config.xml, it seems that the datasource does not get the values when establishing a new connection.

       

      Anyone have any ideas?