4 Replies Latest reply on Apr 30, 2003 2:39 AM by kvikram

    Connection pooling

    catharine

      I am using JBoss with SQL Server. I have installed the JDBC driver for SQL Server and this works fine, although I am getting a new connection for each query I run.

      I would like to setup connection pooling in JBoss, but don't know what I need to do. I have done a web search for this info, but seem to get conflicting examples of how to do this.

      Can anyone help?
      Catharine

        • 1. Re: Connection pooling

          The configuration has changed (simplified)
          over time.

          You will find example configurations relevent
          for your release in
          /docs/examples/jca

          It will be something like
          mssql-service.xml or mssql-ds.xml

          If you have problems, try the "DataSource Configuration" forum.

          Regards,
          Adrian

          • 2. Re: Connection pooling
            catharine

            Thanks for your help with this. I havn't managed to get it working yet but I am now a stage closer and I will do as you suggested and follow this up in the connection pooling forum.

            Cheers,
            Catharine

            • 3. Re: Connection pooling
              kvikram

              1)Copy mssql-ds.xml from jboss\docs\examples\jca to jboss\server\default\deploy folder.

              2)Do the foll changes to mssql-ds.xml.

              a)Remember if the datasource in ejb's jaws.xml is "java:/taroPool" i.e java:/myPool Then use "myPool" as the jndiname <jndi-name>myPool</jndi-name>

              b)Change the database name,server name,userid,password to the actual values u want to use in the <connection-url> tag.

              3)Copy all the required jar files for the driver for MSSqlServer put msbase.jar,mssqlserver.jar,msutil.jar files in the default/deploy folder(or \default\lib folder .This may need a restart of Jboss)

              4)As i had problems i changed the default values in the standardjbosscmp-jdbc.xml to


              ....
              java:/myPool
              <datasource-mapping>MS SQLSERVER2000</datasource-mapping>

              .....

              • 4. Re: Connection pooling
                kvikram

                1)Copy mssql-ds.xml from jboss\docs\examples\jca to jboss\server\default\deploy folder.

                2)Do the foll changes to mssql-ds.xml.

                a)Remember if the datasource in your ejb's jaws.xml is "java:/taroPool" i.e java:/myPool. Then use "myPool" as the jndiname <jndi-name>myPool</jndi-name>

                b)Change the database name,server name,userid,password to the actual values in the <connection-url> tag.

                3)Copy all the required jar files for the driver for MSSqlServer put msbase.jar,mssqlserver.jar,msutil.jar files in the default/deploy folder(or /default/lib folder .This may need a restart of Jboss)