0 Replies Latest reply on Sep 6, 2010 10:28 PM by Thunder Lei

    Verified MS Sqlserver2005 XA datasource config

    Thunder Lei Newbie

      When I try to config xa datasource for MS sqlserver 2005 driver, I encounter some issues, and I see there are a lot of people have the similar issue.

      Eventually after I google and test, I make it.

      post the config here for reference, maybe it's not best practice, but it works.

       

      <datasources>
        <xa-datasource>
          <jndi-name>peoplesoftXA</jndi-name>
          <!-- uncomment to enable interleaving <interleaving/> -->
          <track-connection-by-tx></track-connection-by-tx>
          <isSameRM-override-value>false</isSameRM-override-value>
          <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
          <xa-datasource-property name="ServerName">@peoplesoft-database-server@</xa-datasource-property>
          <xa-datasource-property name="PortNumber">@peoplesoft-database-port@</xa-datasource-property>
          <xa-datasource-property name="DatabaseName">@peoplesoft-database-name@</xa-datasource-property>
          <xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>
          <xa-datasource-property name="User">@peoplesoft-connection-pool-user-name@</xa-datasource-property>
      <xa-datasource-property name="Password">@peoplesoft-connection-pool-password@</xa-datasource-property>
            <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
            <metadata>
               <type-mapping>MS SQLSERVER2005</type-mapping>
            </metadata>
        </xa-datasource>
      </datasources>

      <datasources>

        <xa-datasource>

          <jndi-name>jndiName</jndi-name>

          <track-connection-by-tx></track-connection-by-tx>

          <isSameRM-override-value>false</isSameRM-override-value>

          <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>

          <xa-datasource-property name="ServerName">DB Host</xa-datasource-property>

          <xa-datasource-property name="PortNumber">1344</xa-datasource-property>

          <xa-datasource-property name="DatabaseName">DB Name</xa-datasource-property>

          <xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>

          <xa-datasource-property name="User">user</xa-datasource-property>

      <xa-datasource-property name="Password">password</xa-datasource-property>

       

            <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

            <metadata>

               <type-mapping>MS SQLSERVER2005</type-mapping>

            </metadata>

        </xa-datasource>

      </datasources>

       

      SQL Server JDBC Driver version, 2005 - 1.2.2828