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
This commit is contained in:
Gary Tully 2011-05-09 16:55:51 +00:00
parent 1667d80041
commit 842686a908
1 changed files with 1 additions and 3 deletions

View File

@ -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();