Hibernate を使用して MSSQL 2005 データベースに接続する Java Web アプリケーションがあります。
アプリケーションから DB への接続は重要ではないため、データベースが利用できないときにアプリケーションがどのように動作するかをテストしたいと考えました。
SQL サービスを停止し、データベースでクエリを実行する Web アプリケーションの一部を実行すると、アプリケーションが約 30 秒間ハングしますが、その後は通常どおり機能し続けます。
予想どおり、ログのエラーは次のとおりです。
2012-08-13 16:33:04,974 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 08S01
2012-08-13 16:33:04,974 ERROR [JDBCExceptionReporter] The TCP/IP connection to the host bonnie.uk, port 1433 has failed. Error: "Connection refused. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
アプリケーションのハングタイムを短縮する方法を知っている人はいますか?
ありがとう
ショー