From: <ssk...@vh...> - 2005-09-15 08:48:09
|
Author: sskracic Date: 2005-09-15 10:38:57 +0200 (Thu, 15 Sep 2005) New Revision: 810 Modified: ccm-core/trunk/src/com/redhat/persistence/engine/rdbms/RDBMSEngine.java Log: Sometimes, when connection to the database is interrupted and an SQLException is thrown, the connection is still marked as acquired. This is not good, since it will not undergo JDBC connection validity test in PooledConnectionSource$Tester. Instead, it will keep hanging on forever, resulting in unpredictable 500 Error pages whenever persistence choses to use it (and why it does so even if the conn is marked as acquired is beyond me). Modified: ccm-core/trunk/src/com/redhat/persistence/engine/rdbms/RDBMSEngine.java =================================================================== --- ccm-core/trunk/src/com/redhat/persistence/engine/rdbms/RDBMSEngine.java 2005-09-14 20:08:43 UTC (rev 809) +++ ccm-core/trunk/src/com/redhat/persistence/engine/rdbms/RDBMSEngine.java 2005-09-15 08:38:57 UTC (rev 810) @@ -511,6 +511,7 @@ } catch (SQLException e) { if (cycle != null) { cycle.endExecute(e); } logQueryDetails(Priority.ERROR, sql, w, op, e); + release(); throw new RDBMSException(e.getMessage()) {}; } catch (RuntimeException e) { logQueryDetails(Priority.ERROR, sql, w, op, e); |