Index: doc/release-notes.xml =================================================================== RCS file: /scm/castor/castor/src/doc/release-notes.xml,v retrieving revision 1.208 diff -u -r1.208 release-notes.xml --- doc/release-notes.xml 16 Mar 2006 23:04:23 -0000 1.208 +++ doc/release-notes.xml 16 Mar 2006 23:40:05 -0000 @@ -93,6 +93,26 @@ + + + Fixed false alarm log message at DatabaseImpl.finalize. + + + Bruce Snyder + bruce DOT snyder AT gmail DOT com + + + Ralf Joachim + ralf.joachim@syscon-world.de + + + Bruce Snyder + bruce DOT snyder AT gmail DOT com + + Bug + JDO + 20060316 + Removed deprecated classes and methods. Index: etc/CHANGELOG =================================================================== RCS file: /scm/castor/castor/src/etc/CHANGELOG,v retrieving revision 1.361 diff -u -r1.361 CHANGELOG --- etc/CHANGELOG 16 Mar 2006 23:04:24 -0000 1.361 +++ etc/CHANGELOG 16 Mar 2006 23:40:18 -0000 @@ -2,6 +2,11 @@ Version (CVS) ------------- +JDO: Fixed bug CASTOR-1356 using contribution from Bruce Snyder [bruce.snyder@gmail.com] + Fixed false alarm log message at DatabaseImpl.finalize. + Details: http://jira.codehaus.org/browse/CASTOR-1356 + (Ralf - 20060316) + All: Fixed bug CASTOR-1363 using contribution from Ralf Joachim [ralf.joachim@syscon-world.de] Removed deprecated classes and methods. Details: http://jira.codehaus.org/browse/CASTOR-1363 Index: main/org/exolab/castor/jdo/engine/GlobalDatabaseImpl.java =================================================================== RCS file: /scm/castor/castor/src/main/org/exolab/castor/jdo/engine/GlobalDatabaseImpl.java,v retrieving revision 1.1 diff -u -r1.1 GlobalDatabaseImpl.java --- main/org/exolab/castor/jdo/engine/GlobalDatabaseImpl.java 14 Mar 2006 13:22:04 -0000 1.1 +++ main/org/exolab/castor/jdo/engine/GlobalDatabaseImpl.java 16 Mar 2006 23:40:20 -0000 @@ -138,18 +138,18 @@ * @see java.lang.Object#finalize() */ protected void finalize() throws Throwable { - if (_scope != null) { - - if (!_isPoolInUseForGlobalTransactions) { - // retrieve SQL bound to this Database instance - OQLQuery oqlQuery = getOQLQuery(); - String sql = ((OQLQueryImpl) oqlQuery).getSQL(); - - _log.warn(Messages.format("jdo.finalize_close", this.toString(), _dbName, sql)); - } - close(); - } - } + if (_scope != null || !isActive()) { return; } + + if (!_isPoolInUseForGlobalTransactions) { + // retrieve SQL bound to this Database instance + OQLQuery oqlQuery = getOQLQuery(); + String sql = ((OQLQueryImpl) oqlQuery).getSQL(); + + _log.warn(Messages.format("jdo.finalize_close", this.toString(), _dbName, sql)); + } + + close(); + } /** * @inheritDoc Index: main/org/exolab/castor/jdo/engine/LocalDatabaseImpl.java =================================================================== RCS file: /scm/castor/castor/src/main/org/exolab/castor/jdo/engine/LocalDatabaseImpl.java,v retrieving revision 1.2 diff -u -r1.2 LocalDatabaseImpl.java --- main/org/exolab/castor/jdo/engine/LocalDatabaseImpl.java 15 Mar 2006 20:57:33 -0000 1.2 +++ main/org/exolab/castor/jdo/engine/LocalDatabaseImpl.java 16 Mar 2006 23:40:21 -0000 @@ -113,15 +113,15 @@ * @see java.lang.Object#finalize() */ protected void finalize() throws Throwable { - if (_scope != null) { - - // retrieve SQL bound to this Database instance - OQLQuery oqlQuery = getOQLQuery(); - String sql = ((OQLQueryImpl) oqlQuery).getSQL(); - - _log.warn(Messages.format("jdo.finalize_close", this.toString(), _dbName, sql)); - close(); - } + if (_scope != null || !isActive()) { return; } + + // retrieve SQL bound to this Database instance + OQLQuery oqlQuery = getOQLQuery(); + String sql = ((OQLQueryImpl) oqlQuery).getSQL(); + + _log.warn(Messages.format("jdo.finalize_close", this.toString(), _dbName, sql)); + + close(); } /** @@ -174,7 +174,7 @@ throw except; } finally { try { - // TODO [SMH]: Temporary fix, see bug 1491. + // TODO [SMH]: Temporary fix, see bug 1491/CASTOR-630. if(_ctx.isOpen()) { _ctx.close(); }