Author: seanahn
Date: Mon Jun 8 00:28:58 2009
New Revision: 782481
URL: http://svn.apache.org/viewvc?rev=782481&view=rev
Log:
Don't sweat when the filter is empty for cron clean
Modified:
ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/RuntimeDataCleanupRunnable.java
Modified:
ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/RuntimeDataCleanupRunnable.java
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/RuntimeDataCleanupRunnable.java?rev=782481&r1=782480&r2=782481&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/RuntimeDataCleanupRunnable.java
(original)
+++
ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/RuntimeDataCleanupRunnable.java
Mon Jun 8 00:28:58 2009
@@ -49,13 +49,15 @@
}
public void run() {
- _log.info("CleanInstances.run().");
+ _log.info("CRON CLEAN.run().");
for( String filter : _cleanupInfo.getFilters() ) {
- _log.info("CleanInstances.run(" + filter + ")");
- long numberOfDeletedInstances = 0;
- do {
- numberOfDeletedInstances = cleanInstances(filter,
_cleanupInfo.getCategories(), _transactionSize);
- } while( numberOfDeletedInstances == _transactionSize );
+ if( filter != null && filter.trim().length() > 0 ) {
+ _log.info("CRON CLEAN.run(" + filter + ")");
+ long numberOfDeletedInstances = 0;
+ do {
+ numberOfDeletedInstances = cleanInstances(filter,
_cleanupInfo.getCategories(), _transactionSize);
+ } while( numberOfDeletedInstances == _transactionSize );
+ }
}
}
@@ -73,7 +75,7 @@
filter += " pid<>" + pids.toString();
}
- _log.debug("CleanInstances using filter: " + filter + ", limit: " +
limit);
+ _log.debug("CRON CLEAN using filter: " + filter + ", limit: " + limit);
final InstanceFilter instanceFilter = new InstanceFilter(filter, "",
limit);
try {