[jboss-jira] [JBoss JIRA] (AS7-5557) Connection pool config unable to run check-valid-connection-sql only in background thread
Paul Sideleau (JIRA)
jira-events at lists.jboss.org
Fri Sep 14 11:44:32 EDT 2012
Paul Sideleau created AS7-5557:
----------------------------------
Summary: Connection pool config unable to run check-valid-connection-sql only in background thread
Key: AS7-5557
URL: https://issues.jboss.org/browse/AS7-5557
Project: Application Server 7
Issue Type: Bug
Affects Versions: 7.1.1.Final
Environment: SQL Server 2012
JTDS 1.2.5
JBOSS 7 Cluster using domain controller
Centos OS virtual
Reporter: Paul Sideleau
There may be a bug trying to get check-valid-connection-sql to only run in the background thread instead of every-time a connection is checked out from the pool.
We have our connection pools configured to do background validation. The validate-on-match is explicitly set to false. Our SQL is simply "SELECT 1".
We are using JTDS driver 1.2.5 against SQL Server 2012.
We use new relic for performance monitoring and it is showing that the "SELECT 1" is executed every time a connection is checked out from the pool. When we had this configured under JBOSS 6, new relic correctly did not show the "SELECT 1" statement occurring.
Here is an example datasource that we place in our domain.xml file:
<datasource jta="true" jndi-name="java:jboss/MSSQLDS-DKR" pool-name="jboss/DKR41" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:jtds:sqlserver://OUR_DATABASE;sendStringParametersAsUnicode=true;</connection-url>
<driver>jtds-1.2.5.jar</driver>
<transaction-isolation>TRANSACTION_READ_UNCOMMITTED</transaction-isolation>
<pool>
<min-pool-size>45</min-pool-size>
<max-pool-size>150</max-pool-size>
<prefill>false</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>username</user-name>
<password>password</password>
</security>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<background-validation-millis>60000</background-validation-millis>
<use-fast-fail>true</use-fast-fail>
</validation>
<timeout>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>2</idle-timeout-minutes>
<query-timeout>30</query-timeout>
</timeout>
</datasource>
Thank you
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list