The following code is where I acutally use the pool. The line "conn =
DriverManager.getConnection(conUrl);" is where it hangs. To reiterate,
it never returns. No exceptions thrown or stackstrace printouts. I
eventually get a transaction timeout from the server after 120 seconds.
Also, to reiterate once more, it works great as long as it is being
used. I recently had a 1 to 2 day period where the app was probably not
getting any traffic, and when I went back, it was hung. This problem was
also reproduced on both Windows and Linux machines. I havn't been able
to put an exact time that it takes for this to occur. Right now, I have
2 instances of the app running on two different servers, and in about 7
hours of idle time, one is hung and the other is still working. One last
thing, I have multiple Connection pools for different databases. I
editted my code for simplicity, but normally the conUrl String is built
dynamically to invoke the appropriate connection pool.
Connection conn = null;
try {
String conUrl = "jdbc:apache:commons:dbcp:/inventoryDB";
conn = DriverManager.getConnection(conUrl);
.....
}
catch(SQLException sql)
{
log.error(sql.getMessage(), sql);
throw new InventoryMonitorException(sql.getMessage());
}
finally
{
if(conn!=null) {
try {
conn.close();
log.debug("conn closed.");
}
catch (SQLException e)
{
e.printStackTrace();
}
}
Thanks,
Mike Zatko
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]