I am trying to connect to an IBM DB2 9 database on a Linux server from my Java application. I am using db2jcc.jar (DB2 Universal JDBC Driver).
Establishing a connection is taking a ridiculous amount of time. What could be wrong? I know there are a lot of factors that could cause this, but I want to get down to the root cause.
解决方案
First off I would try to up the log level on the driver to debug or even trace. This might give you an easy way of seeing where it is hanging in it's attempt to complete the connection. Are you using log4j?