-
Notifications
You must be signed in to change notification settings - Fork 465
Throw exception on first connection instead of retry for incorrect password #483
Description
Filing on behalf of a comment left on JDBC docs
Driver version or jar name
JDBC Driver 3.0
SQL Server version
N/A
Client operating system
N/A
Java/JVM version
N/A
Table schema
N/A
Problem description
The issue is that when the SQLServerConnection class fails to make a connection on an incorrect password, we would require the SQL Server driver to throw an exception and abort the connection attempt instead of a looping retry on the same credentials. This will allow the Hikari pool to create a new connection with a new password.
Is there a way that we can SQL Server driver to throw an exception on the first connection exception instead of retrying for the duration of the set timeout? This would allow the connection pool to manage retrying connections. We were unable to find any settings for the jdbc connection string to achieve this.
We checked the latest version but there isn't a solution to this problem yet. https://github.com/Microsoft/mssql-jdbc/blob/master/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java