ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sean...@apache.org
Subject svn commit: r782483 - /ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/RuntimeDataCleanupRunnable.java
Date Mon, 08 Jun 2009 00:45:57 GMT
Author: seanahn
Date: Mon Jun  8 00:45:57 2009
New Revision: 782483

URL: http://svn.apache.org/viewvc?rev=782483&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=782483&r1=782482&r2=782483&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:45:57 2009
@@ -50,8 +50,22 @@
     
     public void run() {
         _log.info("CRON CLEAN.run().");
+
         for( String filter : _cleanupInfo.getFilters() ) {
-            if( filter != null && filter.trim().length() > 0 ) {
+            if( _pid != null ) {
+                filter += " pid=" + _pid;
+            } else if( _pidsToExclude != null ) {
+                StringBuffer pids = new StringBuffer();
+                for( QName pid : _pidsToExclude ) {
+                    if( pids.length() > 0 ) {
+                        pids.append("|");
+                    }
+                    pids.append(pid);
+                }
+                filter += " pid<>" + pids.toString();
+            }
+            
+            if( filter.trim().length() > 0 ) {
                 _log.info("CRON CLEAN.run(" + filter + ")");
                 long numberOfDeletedInstances = 0;
                 do {
@@ -62,19 +76,6 @@
     }
     
     int cleanInstances(String filter, final Set<CLEANUP_CATEGORY> categories, int limit)
{
-        if( _pid != null ) {
-            filter += " pid=" + _pid;
-        } else if( _pidsToExclude != null ) {
-            StringBuffer pids = new StringBuffer();
-            for( QName pid : _pidsToExclude ) {
-                if( pids.length() > 0 ) {
-                    pids.append("|");
-                }
-                pids.append(pid);
-            }
-            filter += " pid<>" + pids.toString();
-        }
-        
         _log.debug("CRON CLEAN using filter: " + filter + ", limit: " + limit);
         
         final InstanceFilter instanceFilter = new InstanceFilter(filter, "", limit);



Mime
View raw message