sqljdbc

Glassfish/Toplink and sqljdbc.jar retrying forever on broken db-connection

I'm using Glassfish and Toplink together with an MS-SQL-Server, thus sqljdbc4.jar is used for connecting to the database. When the database is not available (DB server is down), the CPU usage rises to 100% and Glassfish keeps on trying to connect forever. My log fills up rapidly with the following messages: FINE: TDSChannel (ConnectionI...

SQL Server JDBC: unable to create new native thread

We are using Microsoft's sqljdbc driver 1.2 in combination with Hibernate under Windows. Occasionally we are getting an OutOfMemoryError from the JDBC driver although plenty of memory is still available in the JVM heap. Here's a stack trace of the exception we are getting: java.lang.OutOfMemoryError: unable to create new native thread ...