mirror of https://github.com/apache/activemq.git
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:
parent
1667d80041
commit
842686a908
|
@ -298,15 +298,13 @@ public class JDBCPersistenceAdapter extends DataSourceSupport implements Persist
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup();
|
|
||||||
|
|
||||||
// Cleanup the db periodically.
|
// Cleanup the db periodically.
|
||||||
if (cleanupPeriod > 0) {
|
if (cleanupPeriod > 0) {
|
||||||
cleanupTicket = getScheduledThreadPoolExecutor().scheduleWithFixedDelay(new Runnable() {
|
cleanupTicket = getScheduledThreadPoolExecutor().scheduleWithFixedDelay(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
}, cleanupPeriod, cleanupPeriod, TimeUnit.MILLISECONDS);
|
}, 0, cleanupPeriod, TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
createMessageAudit();
|
createMessageAudit();
|
||||||
|
|
Loading…
Reference in New Issue