3 Replies Latest reply on Sep 5, 2006 2:06 PM by ivan

    How to configure JBoss with MS SQL Server

    Tahir Akram Newbie

      Hello Forum!

      I want to know how to configure JBoss with MS SQL Server, I have downloaded sqljdbc.jar from Microsoft (is this the very file needed for configuration?) site but couldnt findout any tutorial or howTo,

      I have SQL Server version 2000 does the configuration same with version 2005?

      can u plz help me in this configuration?

      Thanks in advance

      - Tahir

        • 1. Re: How to configure JBoss with MS SQL Server
          Jovi Ho Anh Newbie

          I used the configuration for MSSQL 2000 with msbase.jar, msutil.jar, mssqlserver.jar then my app worked fine in some cases but could not execute multiple statements with "Can't start a cloned connection while in manual transaction mode." exception.

          When I try to use below configuration for MSSQL 2005 with sqljdbc.jar

          <?xml version="1.0" encoding="UTF-8"?>
          <!-- The SQL Server 2005 Database JCA connection factory config -->
          <datasources>
           <local-tx-datasource>
           <jndi-name>MYDATASOURCE</jndi-name>
           <connection-url>jdbc:sqlserver://my-server;databaseName=MYDATABASE</connection-url>
           <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
           <user-name>user</user-name>
           <password>password</password>
           <!-- This will be run before a managed connection is removed from the pool for use by a client-->
           <check-valid-connection-sql>select 1</check-valid-connection-sql>
           <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
           <min-pool-size>10</min-pool-size>
           <!-- The maximum connections in a pool/sub-pool -->
           <max-pool-size>30</max-pool-size>
           </local-tx-datasource>
          </datasources>


          then my app could not get connection from datasource.

          • 2. Re: How to configure JBoss with MS SQL Server
            Jovi Ho Anh Newbie

            Tried to use below configuration for MSSQL 2005 with sqljdbc.jar and did succesfull:

            <?xml version="1.0" encoding="UTF-8"?>
            <datasources>
             <local-tx-datasource>
             <jndi-name>MYDATASOURCE</jndi-name>
            
            <connection-url>jdbc:sqlserver://my-server;databaseName=MYDATABASE;SelectMethod=cursor</connection-url>
            
            <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
             <user-name>user</user-name>
             <password>password</password>
             <min-pool-size>5</min-pool-size>
             <max-pool-size>10</max-pool-size>
             <blocking-timeout-millis>50000</blocking-timeout-millis>
             <idle-timeout-minutes>30</idle-timeout-minutes>
             <meta-data>
             <type-mapping>MS SQLSERVER2005</type-mapping>
             </meta-data>
             </local-tx-datasource>
            </datasources>
            


            • 3. Re: How to configure JBoss with MS SQL Server
              ivan Newbie

              Could you post your standardjbosscmp-jdbc.xml excerpt
              for the SQLSERVER 2005 type mappings?
              Or where can I get it?

              I keep on getting The Incoming Tabular Data Stream (TDS) remote procedure call (RPC).

              What version of the driver are you using?

              Best regards,
              Ivan