Title: [1057] trunk/servicemix-core/src/main/java/org/servicemix/components/util/PollingComponentSupport.java: Fixed schoolboy bug
Revision
1057
Author
gastaldi
Date
2005-12-09 12:51:07 -0500 (Fri, 09 Dec 2005)

Log Message

Fixed schoolboy bug

Modified Paths


Diff

Modified: trunk/servicemix-core/src/main/java/org/servicemix/components/util/PollingComponentSupport.java (1056 => 1057)

--- trunk/servicemix-core/src/main/java/org/servicemix/components/util/PollingComponentSupport.java	2005-12-09 17:46:21 UTC (rev 1056)
+++ trunk/servicemix-core/src/main/java/org/servicemix/components/util/PollingComponentSupport.java	2005-12-09 17:51:07 UTC (rev 1057)
@@ -115,7 +115,7 @@
             if (schedulerTask != null) {
                 schedulerTask.cancel();
             }
-            schedulerTask = new PollTimerTask();
+            schedulerTask = new PollSchedulerTask();
             this.scheduler.schedule(schedulerTask,scheduleIterator);
         }
         super.start();
@@ -143,8 +143,8 @@
         if (scheduler == null) {
             scheduler = new Scheduler(true);
         }
-        if (scheduleIterator != null) {
-        	scheduleIterator = new PollIterator();
+        if (scheduleIterator == null) {
+        	scheduleIterator = new PollScheduleIterator();
         }
         if (workManager == null) {
             ComponentContextImpl context = (ComponentContextImpl) getContext();
@@ -154,7 +154,7 @@
        
     }
     
-    private class PollTimerTask extends SchedulerTask {
+    private class PollSchedulerTask extends SchedulerTask {
     	public void run() {
 	        try {
 	            // lets run the work inside the JCA worker pools to ensure
@@ -167,7 +167,7 @@
     	}
     }
     
-    private class PollIterator implements ScheduleIterator {
+    private class PollScheduleIterator implements ScheduleIterator {
     	public Date nextExecution() {
     		long nextTime = System.currentTimeMillis();
         	if (scheduleExecutedFlag) {

Reply via email to