# HG changeset patch # User Ingo Weinzierl # Date 1338903134 0 # Node ID b7831cefbb62f23a8a9fc2db92e1a70324c52a68 # Parent cdc8b7c64856eedb954e52d28ae0d579dca33cfa Added some more debug output during the process of removing Artifacts and Collections by the DatabaseCleaner. artifacts/trunk@4585 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r cdc8b7c64856 -r b7831cefbb62 ChangeLog --- a/ChangeLog Fri Jun 01 09:49:07 2012 +0000 +++ b/ChangeLog Tue Jun 05 13:32:14 2012 +0000 @@ -1,3 +1,10 @@ +2012-06-05 Ingo Weinzierl + + * artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java: + Added some more debug output during the process of removing Artifacts + and Collections with the DatabaseCleaner. + 2012-06-01 Sascha L. Teichmann * artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java: diff -r cdc8b7c64856 -r b7831cefbb62 artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java Fri Jun 01 09:49:07 2012 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java Tue Jun 05 13:32:14 2012 +0000 @@ -1308,6 +1308,8 @@ reset(); // outdate artifacts that are only in this collection + logger.info("Outdate Artifacts that belong to collection: " + id); + prepareStatement(SQL_OUTDATE_ARTIFACTS_COLLECTION); stmnt.setInt(1, id); stmnt.setInt(2, id); diff -r cdc8b7c64856 -r b7831cefbb62 artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java Fri Jun 01 09:49:07 2012 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java Tue Jun 05 13:32:14 2012 +0000 @@ -307,6 +307,7 @@ stmnt = connection.prepareStatement(SQL_DELETE_COLLECTION_ITEMS); for (IdIdentifier id: cs) { + logger.debug("Mark collection for deletion: " + id.id); stmnt.setInt(1, id.id); stmnt.execute(); } @@ -355,17 +356,23 @@ idData.factoryName, idData.data); idData.data = null; + logger.debug("Prepare Artifact (id=" + + idData.id + ") for deletion."); + stmnt.setInt(1, idData.id); stmnt.execute(); connection.commit(); try { if (artifact != null) { + logger.debug("Call endOfLife for Artifact: " + + artifact.identifier()); + artifact.endOfLife(context); } } catch (Exception e) { - logger.error(e.getLocalizedMessage(), e); + logger.error(e.getMessage(), e); } deletedArtifacts.add(idData.identifier);