[jbpm-commits] JBoss JBPM SVN: r5020 - jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Jun 10 04:11:40 EDT 2009


Author: tom.baeyens at jboss.com
Date: 2009-06-10 04:11:40 -0400 (Wed, 10 Jun 2009)
New Revision: 5020

Modified:
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
Log:
reverting timer change to fix compilation error in enterprise

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java	2009-06-09 22:21:22 UTC (rev 5019)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java	2009-06-10 08:11:40 UTC (rev 5020)
@@ -47,7 +47,7 @@
  * @author Pascal Verdage
  * @author Alejandro Guizar
  */
-public class TimerImpl extends JobImpl<Void> implements Timer {
+public class TimerImpl extends JobImpl<Boolean> implements Timer {
 
   private static final long serialVersionUID = 1L;
   private static final Log log = Log.getLog(TimerImpl.class.getName());
@@ -94,7 +94,7 @@
     }
   }
 
-  public Void execute(Environment environment) throws Exception {
+  public Boolean execute(Environment environment) throws Exception {
     if (log.isDebugEnabled()) log.debug("executing " + this);
 
     if (environment==null) {
@@ -112,6 +112,7 @@
       execution.fire(eventName, eventSource);
     }
     
+    boolean deleteThisJob = true;
     // if there is no repeat on this timer
     if (repeat==null) {
       // delete the job
@@ -123,6 +124,7 @@
       dbSession.delete(this);
 
     } else { // there is a repeat on this timer
+      deleteThisJob = false;
       // suppose that it took the timer runner thread a very long time to execute the timers
       // then the repeat action dueDate could already have passed
       do {
@@ -145,12 +147,12 @@
         transaction.registerSynchronization(jobNotificator);
       }
     }
-    
-    return null;
+
+    return deleteThisJob;
   }
 
   public String toString() {
-  	StringBuilder text = new StringBuilder();
+    StringBuilder text = new StringBuilder();
     text.append("timer[");
     text.append(dbid);
     if (dueDate!=null) {
@@ -170,7 +172,7 @@
   }
 
   public static String formatDueDate(Date date) {
-	  return new SimpleDateFormat(dateFormat).format(date);
+      return new SimpleDateFormat(dateFormat).format(date);
   }
 
   public String getSignalName() {




More information about the jbpm-commits mailing list