3 Replies Latest reply on Apr 13, 2004 9:57 AM by adrian.brock

    Possible to configure multiple datasource in single -ds.xml?

    cylim

      Hi All,

      Is that possible to configure multiple datasource in one single -ds.xml file? If i would like to use the JAAS implementation in each of the datasource so that the password is not store in the clear text format, do i need to configure each of my datasource into a different -service.xml?

        • 1. Re: Possible to configure multiple datasource in single -ds.

          No, you can use a single -ds.xml
          The JAAS configuration references the connection manager (which includes the jndi name)

          Regards,
          Adrian

          • 2. Re: Possible to configure multiple datasource in single -ds.
            cylim

            Hi Adrian,

            Thanks for your replied. By the way, if i configured each of the datasource with different <security-domain>. do i need to configure the <security-domain> into my jboss ejb descriptor as well? How to configure the descriptor if i got more than one <security-domain> ?

            • 3. Re: Possible to configure multiple datasource in single -ds.

              The link goes both way see managedConnectionFactoryName in conf/login-config.xml
              e.g.

               <application-policy name = "HsqlDbRealm">
               <authentication>
               <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
               flag = "required">
               <module-option name = "principal">sa</module-option>
               <module-option name = "userName">sa</module-option>
               <module-option name = "password"></module-option>
               <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
               </login-module>
               </authentication>
               </application-policy>
              


              The ejb configuration is irrelevent unless you are using CallerIdentityLoginModule.

              Regards,
              Adrian