2 Replies Latest reply on Mar 18, 2010 3:00 AM by Fawad Ali

    Is JNDI connection pooling for the whole container or for each war file

    Fawad Ali Newbie

      Hello All,

                   I am developing an application which consists of several different modules pointing to the same database. I have configured the datasource in a JNDI file. I have done connection pooling in it like below:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <datasources>
        <local-tx-datasource>
          <jndi-name>jdbc/public_PostgreSQL</jndi-name>
              <connection-url>jdbc:postgresql://localhost/autohaul2</connection-url>
              <driver-class>org.postgresql.Driver</driver-class>
              <user-name>postgres</user-name>
              <password>stafona</password>
              <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>

       

      Now my question is that whether this pool size will be for the whole container or each war file will have its own 20 pool size. For example, if I have the following modules:

       

      Module A

      Module B

      Module C

      Module D

       

      and each module pointing to the same datasource in JNDI. So the whole system will have a max-pool-size=20 or 80?