Microsoft driver does not time out during connection validation using JDBC4ValidConnectionChecker in JBoss EAP

Solution Unverified - Updated -

Issue

  • Observing hangs during connection validation (of externally terminated connections) when using the JDBC4ValidConnectionChecker validation class.
  • A series of thread dumps collected over a minute or more show the same (unchanging) stack trace:

    java.lang.Thread.State: RUNNABLE
        at java.net.SocketInputStream.socketRead0(Native Method)
        ...
        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7417)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3488)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:262)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:237)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQueryInternal(SQLServerStatement.java:722)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.isValid(SQLServerConnection.java:6122)
        at org.jboss.jca.adapters.jdbc.extensions.novendor.JDBC4ValidConnectionChecker.isValidConnection(JDBC4ValidConnectionChecker.java:58)
        at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:1285)
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7
  • Microsoft SQL Server JDBC Driver

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content