From 842686a908c1d727a2bbdb37acd7b6f9ab6d5740 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Mon, 9 May 2011 16:55:51 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-2063 - JDBC persistence adapter improvements. make cleanup conditional on cleanupInterval > 0. Variants of the other improvements are already present on trunk git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1101109 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/store/jdbc/JDBCPersistenceAdapter.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java index e122b4e8a0..5e57a41834 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java @@ -298,15 +298,13 @@ public class JDBCPersistenceAdapter extends DataSourceSupport implements Persist } } - cleanup(); - // Cleanup the db periodically. if (cleanupPeriod > 0) { cleanupTicket = getScheduledThreadPoolExecutor().scheduleWithFixedDelay(new Runnable() { public void run() { cleanup(); } - }, cleanupPeriod, cleanupPeriod, TimeUnit.MILLISECONDS); + }, 0, cleanupPeriod, TimeUnit.MILLISECONDS); } createMessageAudit();