3 Replies Latest reply on Apr 3, 2008 12:27 PM by peterj

    max DB connections

    kalinkula

      hi all,

      can anyone tell me wether it is configurable the maximum numbers of DB connections of one JBOSS server ? And: Do i configure the maximum numbers of connections to a database or to a database server ?

      thanks in advance for feedback!

        • 1. Re: max DB connections

          configure a pooled datasource and you can define how many connections the pool can contain.

          • 2. Re: max DB connections
            peterj

            Add min-pool-size and max-pool-size entries to your *-ds.xml file:

            <datasources>
             <local-tx-datasource>
             ...
             <min-pool-size>5</min-pool-size>
             <max-pool-size>20</max-pool-size>
             <idle-timeout-minutes>5</idle-timeout-minutes>
             </local-tx-datasource>
            </datasources>


            • 3. Re: max DB connections
              peterj

              Oh, and make sure that your database is configured to accept the same number of connections. If you have multiple data sources going to the same database, then the database max connections must be the sum of the max-pool-size values for all of the data sources.