Hi All,
I am using JBoss 3.2.1 with MS SQL Server. I am using the MS JDBC drivers. Basically, if I stop the database and restart it I expect the Connection Pool for the database to reconnect when possible. However, what I am seeing is that if the datasource includes a check-valid-connection-sql element, then this does not work. However, it does seem to work fine without the check-valid-connection-sql element. That is the database connections reconnect whenever the database becomes available.
Thanks,
-MLA
Here is an excerpt from mssql-ds.xml
.
.
<local-tx-datasource>
<jndi-name>aDataSource</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://a.host.com:1433;DatabaseName=dbName;SelectMethod=cursor</connection-url>
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
<user-name>aUser</user-name>
aPassword
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<valid-connection-sql>select count (*) from aConnectionTestTable</valid-connection-sql>
</local-tx-datasource>
.
.