2 Replies Latest reply on Jun 26, 2017 3:15 AM by arkadyz

    How to start Wildfly with <min-pool-size> database connections

    arkadyz

      Hello,

       

      I am using Wildfly 8.2.0, defined <pool> section for database and would like to start with number of database connections as defined at <min-pool-size>.

      But I see wildfly starts with number of database connections as defined at <max-pool-size>.

       

      My definition in standalone.xml is following:

       

              <subsystem xmlns="urn:jboss:domain:datasources:2.0">

                  <datasources>

                      <datasource jndi-name="java:/AllotDS" pool-name="AllotDS" enabled="true" use-java-context="true">

                          <connection-url>jdbc:sybase:Tds:localhost:50000?ServiceName=allot_cfg&amp;autocommit=FALSE&amp;</connection-url>

                          <driver>sybase</driver>

                  <pool>

                      <min-pool-size>100</min-pool-size>

                      <max-pool-size>200</max-pool-size>

                      <prefill>true</prefill>

                  </pool>

       

       

                          <new-connection-sql>SET TEMPORARY OPTION CONNECTION_AUTHENTICATION='Company=Allot Communications ;Application=NMS;Signature=000fa55157edb8e14d818eb4fe3db41447146f1571g31c135e4bd3389fd38ffbdb396dcd276546096ff'</new-connection-sql>

                          <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

                          <security>

                              <security-domain>EncryptDBPassword</security-domain>

                          </security>

                          <timeout>

                              <idle-timeout-minutes>5</idle-timeout-minutes>

                          </timeout>

                          <statement>

                              <track-statements>true</track-statements>

                          </statement>

                      </datasource>

                      <drivers>

                          <driver name="sybase" module="com.sybase">

                              <driver-class>com.sybase.jdbc3.jdbc.SybDriver</driver-class>

                          </driver>

                      </drivers>

                  </datasources>

              </subsystem>

       

      I am checking number of database connections by "netstat" command on port 50000:

       

      [root@NMS-ACP1610-10117 ~]# netstat -anp | grep :50000 | grep ESTABLISHED | wc -l

      200

       

      If I remove <prefill> or set it to "false" so the result of "netstat" is 2 (and not 100).

       

      So how to start Wildfly 8.2.0 with with number of database connections as defined at <min-pool-size> ?

       

      Thanks,

      Arkady