Why does JBoss EAP create the number of max-pool-size + 1 connections?

Solution Verified - Updated -

Issue

  • Why does JBoss EAP create the number of max-pool-size + 1 connections?
  • We have an issue when we configure a XA datasource in a instance.
  • XA-Datasource open more connection than configured.

  • The XA datasource is configured with the following parameters:

                <xa-datasource jndi-name="java:/jdbc/testDS" pool-name="testDS" enabled="true">
                    <xa-datasource-property name="URL">xxxxxx</xa-datasource-property>
                    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
                    <driver>oracle</driver>
                    <xa-pool>
                        <min-pool-size>2</min-pool-size>
                        <max-pool-size>2</max-pool-size>
                        <prefill>true</prefill>
                    </xa-pool>
                    <security>
                        <user-name>xxxxxx</user-name>
                        <password>***</password>
                    </security>
                    <validation>
                        <check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
                        <background-validation>true</background-validation>
                        <background-validation-millis>5000</background-validation-millis>
                    </validation>
                </xa-datasource>

                <drivers>
                    <driver name="oracle" module="com.oracle.db">
                        <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
                    </driver>
                </drivers>
  • As shown in the configuration, the minimum and maximum number of connections is set at 2.
  • When we start the instance, it sets 3 connections but the statistics only show 2:
[standalone@abcd:1010 xa-data-source=testDS] ls statistics=pool
ActiveCount=2             AverageCreationTime=2458  InUseCount=0              MaxWaitCount=0            TotalBlockingTime=0       
AvailableCount=2          CreatedCount=2            MaxCreationTime=3978      MaxWaitTime=0             TotalCreationTime=4917    
AverageBlockingTime=0     DestroyedCount=0          MaxUsedCount=1            TimedOut=0                
[standalone@abcd: 1010 xa-data-source=testDS]
  • By firing SELECT query in Database Session it shows 3 connections as below:
SELECT MACHINE, logon_time from V$SESSION WHERE USERNAME='XXXXX' and MACHINE='***' order by machine;   


MACHINE                                                          LOGON_TIME
---------------------------------------------------------------- -----------
***                                                          13/05/2015 14:51
***                                                          13/05/2015 14:51
***                                                          13/05/2015 14:53
  • What does this behavior due to?
  • This issue is causing us some problems in production environment.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x
  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.